summaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-06-11 16:35:11 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-18 16:42:58 +0000
commitf077bf13efee6d57261f76544e89a10acafb5a9c (patch)
tree9a438cd2cee32153586a477c22fea62b703199e5 /src/qml/jsruntime/qv4script_p.h
parentfe9b63780da81fa8e3746e519dda320d57436503 (diff)
Clean up ExecutionContext's for QML
Create a specialized QmlContext instead of re-using a call context with a QQmlContextWrapper as activation object. This saves some memory and opens up the route to getting rid of the context wrapper in a future commit. Change-Id: I1591c73932a08564fddf5137ac05bbc6f31dd4d5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script_p.h')
-rw-r--r--src/qml/jsruntime/qv4script_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h
index 59a589a624..4c8644e8c2 100644
--- a/src/qml/jsruntime/qv4script_p.h
+++ b/src/qml/jsruntime/qv4script_p.h
@@ -91,7 +91,6 @@ struct QmlBindingWrapper : Heap::FunctionObject {
// Constructor for QML functions and signal handlers, resulting binding wrapper is not callable!
QmlBindingWrapper(QV4::ExecutionContext *scope, QV4::Object *qml);
Pointer<Object> qml;
- Pointer<CallContext> qmlContext;
};
}
@@ -99,10 +98,10 @@ struct QmlBindingWrapper : Heap::FunctionObject {
struct Q_QML_EXPORT QmlBindingWrapper : FunctionObject {
V4_OBJECT2(QmlBindingWrapper, FunctionObject)
- static ReturnedValue call(const Managed *that, CallData *);
+ static ReturnedValue call(const Managed *that, CallData *callData);
static void markObjects(Heap::Base *m, ExecutionEngine *e);
- Heap::CallContext *context() const { return d()->qmlContext; }
+ Heap::QmlContext *context() const { return static_cast<Heap::QmlContext *>(d()->scope.ptr); }
static Heap::FunctionObject *createQmlCallableForFunction(QQmlContextData *qmlContext, QObject *scopeObject, QV4::Function *runtimeFunction,
const QList<QByteArray> &signalParameters = QList<QByteArray>(), QString *error = 0);