diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-07-27 08:28:30 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-07-27 10:30:23 (GMT) |
commit | 39097c5d652efd3eb0946e5a215d82573a46dbf9 (patch) | |
tree | 4c7c734337ca0daef8a100dd5152a0b88d328a4d /src/script | |
parent | 47857453767a0ec2c7b75a555658dd166bd7d3d4 (diff) | |
download | Qt-39097c5d652efd3eb0946e5a215d82573a46dbf9.zip Qt-39097c5d652efd3eb0946e5a215d82573a46dbf9.tar.gz Qt-39097c5d652efd3eb0946e5a215d82573a46dbf9.tar.bz2 |
QScriptDeclarativeObject: we need to save the current stack pointer.
in DeclarativeObjectDelegate::put, else we cannot get a proper
backtrace in the debugger.
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/bridge/qscriptdeclarativeobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/bridge/qscriptdeclarativeobject.cpp b/src/script/bridge/qscriptdeclarativeobject.cpp index 6e08b83..f330ac0 100644 --- a/src/script/bridge/qscriptdeclarativeobject.cpp +++ b/src/script/bridge/qscriptdeclarativeobject.cpp @@ -88,6 +88,7 @@ void DeclarativeObjectDelegate::put(QScriptObject* object, JSC::ExecState *exec, JSC::JSValue value, JSC::PutPropertySlot &slot) { QScriptEnginePrivate *engine = scriptEngineFromExec(exec); + QScript::SaveFrameHelper saveFrame(engine, exec); QScriptDeclarativeClass::Identifier identifier = (void *)propertyName.ustring().rep(); QScriptDeclarativeClassPrivate *p = QScriptDeclarativeClassPrivate::get(m_class); @@ -144,7 +145,7 @@ JSC::JSValue DeclarativeObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject QScriptDeclarativeClass *scriptClass = static_cast<DeclarativeObjectDelegate*>(delegate)->m_class; QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec); - JSC::ExecState *oldFrame = eng_p->currentFrame; + QScript::SaveFrameHelper saveFrame(eng_p, exec); eng_p->pushContext(exec, thisValue, args, callee); QScriptContext *ctxt = eng_p->contextForFrame(eng_p->currentFrame); @@ -153,7 +154,6 @@ JSC::JSValue DeclarativeObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject scriptClass->call(static_cast<DeclarativeObjectDelegate*>(delegate)->m_object, ctxt); eng_p->popContext(); - eng_p->currentFrame = oldFrame; return (JSC::JSValue &)(result); } |