diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-09 12:56:34 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-09 12:56:34 (GMT) |
commit | cf586d466bea0629b5aa6f96f8e0e97333c44071 (patch) | |
tree | 7e6aac32ddd3559e21b5cffca2e7b02e0c39964f | |
parent | 4599876c471cbd20f4ebe0272edfee93af84cdea (diff) | |
download | Qt-cf586d466bea0629b5aa6f96f8e0e97333c44071.zip Qt-cf586d466bea0629b5aa6f96f8e0e97333c44071.tar.gz Qt-cf586d466bea0629b5aa6f96f8e0e97333c44071.tar.bz2 |
invoke signal handler using JSC::call()
Makes sure that new stack frame is set up if the function is
native, and all that.
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index 30c33e1..1dcf602 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -1812,16 +1812,14 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv) JSC::CallData callData; JSC::CallType callType = slot.getCallData(callData); - if (callType == JSC::CallTypeJS) { - if (exec->hadException()) - exec->clearException(); // ### otherwise JSC asserts - (void)JSC::asFunction(slot)->call(exec, thisObject, jscArgs); - } else if (callType == JSC::CallTypeHost) { - (void)callData.native.function(exec, JSC::asObject(slot), thisObject, jscArgs); - } - if (exec->hadException()) + exec->clearException(); // ### otherwise JSC asserts + JSC::call(exec, slot, callType, callData, thisObject, jscArgs); + + if (exec->hadException()) { + engine->uncaughtException = exec->exception(); engine->emitSignalHandlerException(); + } } QObjectConnectionManager::QObjectConnectionManager(QScriptEnginePrivate *eng) |