summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-20 12:18:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-20 12:18:19 (GMT)
commit754e72d64ee4da72fc8f277f697270be57f8a18e (patch)
tree3b150120c28bb5478a4dd2c1283cac1cd07005e0 /src
parent309c79b4697c02160c6245bcd207f913064f90da (diff)
parent6ccff8baa04c4467f7185676b5c632f17fd7ae4c (diff)
downloadQt-754e72d64ee4da72fc8f277f697270be57f8a18e.zip
Qt-754e72d64ee4da72fc8f277f697270be57f8a18e.tar.gz
Qt-754e72d64ee4da72fc8f277f697270be57f8a18e.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QScriptClass-implemented constructors lead to application crash Improve test coverage of QScriptClass::Callable extension
Diffstat (limited to 'src')
-rw-r--r--src/script/bridge/qscriptclassobject.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp
index a3dd239..a4d9cc1 100644
--- a/src/script/bridge/qscriptclassobject.cpp
+++ b/src/script/bridge/qscriptclassobject.cpp
@@ -226,7 +226,7 @@ JSC::JSObject* ClassObjectDelegate::construct(JSC::ExecState *exec, JSC::JSObjec
QScriptClass *scriptClass = static_cast<ClassObjectDelegate*>(delegate)->scriptClass();
QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
- //JSC::ExecState *oldFrame = eng_p->currentFrame;
+ JSC::ExecState *oldFrame = eng_p->currentFrame;
eng_p->pushContext(exec, JSC::JSValue(), args, callee, true);
QScriptContext *ctx = eng_p->contextForFrame(eng_p->currentFrame);
@@ -234,6 +234,8 @@ JSC::JSObject* ClassObjectDelegate::construct(JSC::ExecState *exec, JSC::JSObjec
QScriptValue result = qvariant_cast<QScriptValue>(scriptClass->extension(QScriptClass::Callable, qVariantFromValue(ctx)));
if (!result.isObject())
result = defaultObject;
+ eng_p->popContext();
+ eng_p->currentFrame = oldFrame;
return JSC::asObject(eng_p->scriptValueToJSCValue(result));
}