summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-09-09 08:16:25 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-09-09 08:16:25 (GMT)
commit22105c9952630b45fd6b50b0e3349880940a83f5 (patch)
treefa2231279cc2c4a5a79d206861cd7fbac285c1c7 /src/script/api/qscriptengine.cpp
parent8e3e60b9ea7e4bccbc6d1a7fa90778e847e64190 (diff)
parent2cbc5ee1bc89be2f174566f35eb89b493ba75c69 (diff)
downloadQt-22105c9952630b45fd6b50b0e3349880940a83f5.zip
Qt-22105c9952630b45fd6b50b0e3349880940a83f5.tar.gz
Qt-22105c9952630b45fd6b50b0e3349880940a83f5.tar.bz2
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp5
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);
}