From 39097c5d652efd3eb0946e5a215d82573a46dbf9 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 27 Jul 2010 10:28:30 +0200 Subject: 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 --- src/script/bridge/qscriptdeclarativeobject.cpp | 4 ++-- 1 file 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(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(delegate)->m_object, ctxt); eng_p->popContext(); - eng_p->currentFrame = oldFrame; return (JSC::JSValue &)(result); } -- cgit v0.12