diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-03 12:37:44 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-03 12:37:44 (GMT) |
commit | 5240cbcc6b8f08538b1b9ac389d86749b0330372 (patch) | |
tree | a5e93c9fa8df5d7f06cd0d569c52e8133a1a94e7 /src/script/api | |
parent | d4c9a486ba8c3eae1cebc7632be38f74e9519af5 (diff) | |
download | Qt-5240cbcc6b8f08538b1b9ac389d86749b0330372.zip Qt-5240cbcc6b8f08538b1b9ac389d86749b0330372.tar.gz Qt-5240cbcc6b8f08538b1b9ac389d86749b0330372.tar.bz2 |
make more tests pass
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 2 | ||||
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index be6cdba..16c0371 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1960,6 +1960,8 @@ int QScriptEngine::uncaughtExceptionLineNumber() const */ QStringList QScriptEngine::uncaughtExceptionBacktrace() const { + if (!hasUncaughtException()) + return QStringList(); qWarning("QScriptEngine::uncaughtExceptionBacktrace() not implemented"); // ### implement me // how do we get a bt with JSC? diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 09f0d0c..ff2823b 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1887,8 +1887,6 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, } else if (callType == JSC::CallTypeHost) { result = callData.native.function(exec, JSC::asObject(callee), jscThisObject, jscArgs); } - if (exec->hadException()) - result = exec->exception(); return eng_p->scriptValueFromJSCValue(result); } @@ -2016,8 +2014,6 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args) } else if (constructType == JSC::ConstructTypeHost) { result = constructData.native.function(exec, JSC::asObject(callee), jscArgs); } - if (exec->hadException()) - result = exec->exception(); return eng_p->scriptValueFromJSCValue(result); } |