summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/script/api/qscriptengine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 7ffb178..a54d029 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -452,7 +452,7 @@ JSC::JSValue functionDisconnect(JSC::ExecState *exec, JSC::JSObject */*callee*/,
return JSC::throwError(exec, JSC::TypeError, QScript::qtStringToJSCUString(message));
}
- QScriptEnginePrivate *engine = static_cast<GlobalObject*>(exec->lexicalGlobalObject())->engine;
+ QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
JSC::JSValue receiver;
JSC::JSValue slot;
@@ -535,7 +535,7 @@ JSC::JSValue functionConnect(JSC::ExecState *exec, JSC::JSObject */*callee*/, JS
}
}
- QScriptEnginePrivate *engine = static_cast<GlobalObject*>(exec->lexicalGlobalObject())->engine;
+ QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
JSC::JSValue receiver;
JSC::JSValue slot;
@@ -696,7 +696,7 @@ JSC::JSValue functionPrint(JSC::ExecState* exec, JSC::JSObject*, JSC::JSValue, c
JSC::JSValue functionGC(JSC::ExecState* exec, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&)
{
- QScriptEnginePrivate *engine = static_cast<GlobalObject*>(exec->lexicalGlobalObject())->engine;
+ QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
engine->collectGarbage();
return JSC::jsUndefined();
}