diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-20 08:25:54 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-20 08:25:54 (GMT) |
commit | 6ccff8baa04c4467f7185676b5c632f17fd7ae4c (patch) | |
tree | 5102a93ab6daa3ce8c794e07c547c44786b41e7b /src/script | |
parent | 7706b14fbca90a339a4ed1e55549f100462f9df4 (diff) | |
parent | 04d4cbeb36f75661aca06f93066a8603afd96f76 (diff) | |
download | Qt-6ccff8baa04c4467f7185676b5c632f17fd7ae4c.zip Qt-6ccff8baa04c4467f7185676b5c632f17fd7ae4c.tar.gz Qt-6ccff8baa04c4467f7185676b5c632f17fd7ae4c.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/script')
-rw-r--r-- | src/script/bridge/qscriptclassobject.cpp | 4 |
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)); } |