diff options
author | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-07-15 15:09:51 (GMT) |
---|---|---|
committer | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-07-17 18:11:33 (GMT) |
commit | 86d2d5d3a2568982468d19bfae3b19bfb6b42457 (patch) | |
tree | 82d59ead9617a387c73981199e8e3876a45ac7e9 /src/script/api/qscriptvalue.cpp | |
parent | 7f04bc3a46d4dd5203b9776c102b487b283a6282 (diff) | |
download | Qt-86d2d5d3a2568982468d19bfae3b19bfb6b42457.zip Qt-86d2d5d3a2568982468d19bfae3b19bfb6b42457.tar.gz Qt-86d2d5d3a2568982468d19bfae3b19bfb6b42457.tar.bz2 |
Fix the return value of a function call that throws an error.
Diffstat (limited to 'src/script/api/qscriptvalue.cpp')
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index c3c7c18..79c769a 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1987,8 +1987,10 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, JSC::CallData callData; JSC::CallType callType = callee.getCallData(callData); JSC::JSValue result = JSC::call(exec, callee, callType, callData, jscThisObject, jscArgs); - if (exec->hadException()) + if (exec->hadException()) { eng_p->uncaughtException = exec->exception(); + result = exec->exception(); + } return eng_p->scriptValueFromJSCValue(result); } |