diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-07-27 13:24:15 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-07-27 16:23:37 (GMT) |
commit | da769c4d4bd890e98173baf406f5455052f09c1f (patch) | |
tree | 60891add8ae8468e571abb25978f6abb519bf360 /src/script/bridge | |
parent | 3d0721b71bbec26a47fd1f909b373fc2cf46bc9e (diff) | |
download | Qt-da769c4d4bd890e98173baf406f5455052f09c1f.zip Qt-da769c4d4bd890e98173baf406f5455052f09c1f.tar.gz Qt-da769c4d4bd890e98173baf406f5455052f09c1f.tar.bz2 |
Fix tst_QScriptExtQObject::objectDeleted()
Fix tst_QScriptExtQObject::objectDeleted(), the exception generated
in the JSC script engine needs to be stored in uncaughtException of
QScriptEngine.
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/bridge')
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index d903efd..43c97aa 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -1248,11 +1248,12 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec, JSC::JSValue value, JSC::PutPropertySlot &slot) { QByteArray name = qtStringFromJSCUString(propertyName.ustring()).toLatin1(); + QScriptEnginePrivate *const eng = static_cast<QScript::GlobalObject*>(exec->lexicalGlobalObject())->engine; QObject *qobject = data->value; if (!qobject) { QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject") .arg(QString::fromLatin1(name)); - JSC::throwError(exec, JSC::GeneralError, qtStringToJSCUString(message)); + eng->uncaughtException = JSC::throwError(exec, JSC::GeneralError, qtStringToJSCUString(message)); return; } |