aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp15
-rw-r--r--src/qml/jsruntime/qv4engine_p.h1
2 files changed, 6 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index caf07e8b0b..26991351d1 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -745,18 +745,13 @@ Heap::QmlContext *ExecutionEngine::qmlContext() const
return static_cast<Heap::QmlContext *>(ctx);
}
-Heap::QmlContextWrapper *ExecutionEngine::qmlContextObject() const
+QObject *ExecutionEngine::qmlScopeObject() const
{
Heap::QmlContext *ctx = qmlContext();
if (!ctx)
return 0;
- Q_ASSERT(ctx->qml);
- return ctx->qml;
-}
-QObject *ExecutionEngine::qmlScopeObject() const
-{
- return qmlContextObject()->scopeObject;
+ return ctx->qml->scopeObject;
}
ReturnedValue ExecutionEngine::qmlSingletonWrapper(String *name)
@@ -782,9 +777,11 @@ ReturnedValue ExecutionEngine::qmlSingletonWrapper(String *name)
QQmlContextData *ExecutionEngine::callingQmlContext() const
{
- Heap::QmlContextWrapper *w = qmlContextObject();
+ Heap::QmlContext *ctx = qmlContext();
+ if (!ctx)
+ return 0;
- return w ? w->context.contextData() : 0;
+ return ctx->qml->context.contextData();
}
QVector<StackFrame> ExecutionEngine::stackTrace(int frameLimit) const
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 90564a9652..8f1047a373 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -388,7 +388,6 @@ public:
Heap::Object *newForEachIteratorObject(Object *o);
Heap::QmlContext *qmlContext() const;
- QV4::Heap::QmlContextWrapper *qmlContextObject() const;
QObject *qmlScopeObject() const;
ReturnedValue qmlSingletonWrapper(String *name);
QQmlContextData *callingQmlContext() const;