diff options
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 6dc10d6..087e49c 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -985,6 +985,11 @@ void QScriptEnginePrivate::setDefaultPrototype(int metaTypeId, JSC::JSValue prot QScriptContext *QScriptEnginePrivate::contextForFrame(JSC::ExecState *frame) { + if (frame && frame->callerFrame()->hasHostCallFrameFlag() + && frame->callerFrame()->removeHostCallFrameFlag() == QScript::scriptEngineFromExec(frame)->globalExec()) { + //skip the "fake" context created in Interpreter::execute. + frame = frame->callerFrame()->removeHostCallFrameFlag(); + } return reinterpret_cast<QScriptContext *>(frame); } |