summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/v8/V8WindowErrorHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/v8/V8WindowErrorHandler.cpp')
-rw-r--r--Source/WebCore/bindings/v8/V8WindowErrorHandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/bindings/v8/V8WindowErrorHandler.cpp b/Source/WebCore/bindings/v8/V8WindowErrorHandler.cpp
index 4203ad5..e33a183 100644
--- a/Source/WebCore/bindings/v8/V8WindowErrorHandler.cpp
+++ b/Source/WebCore/bindings/v8/V8WindowErrorHandler.cpp
@@ -54,8 +54,10 @@ v8::Local<v8::Value> V8WindowErrorHandler::callListenerFunction(ScriptExecutionC
v8::Local<v8::Function> callFunction = v8::Local<v8::Function>::Cast(listener);
v8::Local<v8::Object> thisValue = v8::Context::GetCurrent()->Global();
v8::Handle<v8::Value> parameters[3] = { v8String(errorEvent->message()), v8String(errorEvent->filename()), v8::Integer::New(errorEvent->lineno()) };
+ v8::TryCatch tryCatch;
+ tryCatch.SetVerbose(true);
returnValue = callFunction->Call(thisValue, 3, parameters);
- if (!returnValue.IsEmpty() && returnValue->IsBoolean() && !returnValue->BooleanValue())
+ if (!tryCatch.HasCaught() && !returnValue.IsEmpty() && returnValue->IsBoolean() && !returnValue->BooleanValue())
event->preventDefault();
}
return returnValue;