diff options
Diffstat (limited to 'Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp')
-rw-r--r-- | Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp b/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp index f2647da29..d6745bebc 100644 --- a/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp +++ b/Source/JavaScriptCore/bindings/ScriptFunctionCall.cpp @@ -32,6 +32,7 @@ #include "config.h" #include "ScriptFunctionCall.h" +#include "JSCInlines.h" #include "JSLock.h" #include "ScriptValue.h" #include <wtf/text/WTFString.h> @@ -120,7 +121,7 @@ Deprecated::ScriptValue ScriptFunctionCall::call(bool& hadException) JSLockHolder lock(m_exec); - JSValue function = thisObject->get(m_exec, Identifier(m_exec, m_name)); + JSValue function = thisObject->get(m_exec, Identifier::fromString(m_exec, m_name)); if (m_exec->hadException()) { hadException = true; return Deprecated::ScriptValue(); @@ -132,13 +133,15 @@ Deprecated::ScriptValue ScriptFunctionCall::call(bool& hadException) return Deprecated::ScriptValue(); JSValue result; + NakedPtr<Exception> exception; if (m_callHandler) - result = m_callHandler(m_exec, function, callType, callData, thisObject, m_arguments); + result = m_callHandler(m_exec, function, callType, callData, thisObject, m_arguments, exception); else - result = JSC::call(m_exec, function, callType, callData, thisObject, m_arguments); + result = JSC::call(m_exec, function, callType, callData, thisObject, m_arguments, exception); - if (m_exec->hadException()) { - hadException = true; + if (exception) { + // Do not treat a terminated execution exception as having an exception. Just treat it as an empty result. + hadException = !isTerminatedExecutionException(exception); return Deprecated::ScriptValue(); } |