X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=WebCore%2Fbindings%2Fv8%2FV8AbstractEventListener.cpp;h=c0efea58d88d197bc19567bb1fce57e90b2772e1;hp=588ea6cd4b838e33f7ddf4f93f3f8c1d4849dc9b;hb=60766ba5a6bea79efaac17baacf444e86e4c7abc;hpb=eff3c7540b9c4aebf5171591c1bda32a56bbdf12 diff --git a/WebCore/bindings/v8/V8AbstractEventListener.cpp b/WebCore/bindings/v8/V8AbstractEventListener.cpp index 588ea6c..c0efea5 100644 --- a/WebCore/bindings/v8/V8AbstractEventListener.cpp +++ b/WebCore/bindings/v8/V8AbstractEventListener.cpp @@ -82,10 +82,17 @@ void V8AbstractEventListener::invokeEventHandler(v8::Handle v8Conte tryCatch.Reset(); // Call the event handler. + tryCatch.SetVerbose(false); // We do not want to report the exception to the inspector console. returnValue = callListenerFunction(jsEvent, event, isWindowEvent); - tryCatch.Reset(); + + // If an error occurs while handling the event, it should be reported. + if (tryCatch.HasCaught()) { + reportException(0, tryCatch); + tryCatch.Reset(); + } // Restore the old event. This must be done for all exit paths through this method. + tryCatch.SetVerbose(true); if (savedEvent.IsEmpty()) v8Context->Global()->SetHiddenValue(eventSymbol, v8::Undefined()); else