summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-06 16:46:43 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-06 17:16:50 +0200
commit96b047f0f27674ee402ab3624dbb906346ac1847 (patch)
treecae317a31a3d4e60ac6e8057e10af33ba360555b /src/script
parentd17a315a082a8cb5d7f3f5ae47dabbe721982e2c (diff)
downloadqt4-tools-96b047f0f27674ee402ab3624dbb906346ac1847.tar.gz
QScriptContext::parentContext: don't skip unessecary frames
Calling QScriptValue::call doesn't create a fake frame. We can detect a real fake frame as it does not have a callee. Task-number: QT-2270 Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 863ac30f32..b1f36be21b 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -993,7 +993,7 @@ void QScriptEnginePrivate::setDefaultPrototype(int metaTypeId, JSC::JSValue prot
QScriptContext *QScriptEnginePrivate::contextForFrame(JSC::ExecState *frame)
{
- if (frame && frame->callerFrame()->hasHostCallFrameFlag()
+ if (frame && frame->callerFrame()->hasHostCallFrameFlag() && !frame->callee()
&& frame->callerFrame()->removeHostCallFrameFlag() == QScript::scriptEngineFromExec(frame)->globalExec()) {
//skip the "fake" context created in Interpreter::execute.
frame = frame->callerFrame()->removeHostCallFrameFlag();