summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptcontext.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/qscriptcontext.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/qscriptcontext.cpp')
-rw-r--r--src/script/api/qscriptcontext.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 7a09d91..2ca6d26 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -374,12 +374,7 @@ QScriptContext *QScriptContext::parentContext() const
{
const JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this);
JSC::CallFrame *callerFrame = frame->callerFrame()->removeHostCallFrameFlag();
- if (callerFrame && callerFrame->callerFrame()->hasHostCallFrameFlag()
- && callerFrame->callerFrame()->removeHostCallFrameFlag() == QScript::scriptEngineFromExec(frame)->globalExec()) {
- //skip the "fake" context created in Interpreter::execute.
- callerFrame = callerFrame->callerFrame()->removeHostCallFrameFlag();
- }
- return reinterpret_cast<QScriptContext *>(callerFrame);
+ return QScriptEnginePrivate::contextForFrame(callerFrame);
}
/*!