Index: Source/bindings/v8/V8ErrorHandler.cpp |
diff --git a/Source/bindings/v8/V8ErrorHandler.cpp b/Source/bindings/v8/V8ErrorHandler.cpp |
index 8f8b7c2cde57cac8645d7405a760ad79c659b0d8..f7b9681e8d62b30b87a1e8fa67fa24f12f5c253c 100644 |
--- a/Source/bindings/v8/V8ErrorHandler.cpp |
+++ b/Source/bindings/v8/V8ErrorHandler.cpp |
@@ -31,12 +31,16 @@ |
#include "config.h" |
#include "bindings/v8/V8ErrorHandler.h" |
+#include "V8ErrorEvent.h" |
#include "bindings/v8/ScriptController.h" |
#include "bindings/v8/V8Binding.h" |
#include "bindings/v8/V8HiddenPropertyName.h" |
#include "bindings/v8/V8ScriptRunner.h" |
+#include "core/dom/Document.h" |
#include "core/dom/ErrorEvent.h" |
#include "core/dom/EventNames.h" |
+#include "core/dom/ScriptExecutionContext.h" |
+#include "core/page/Frame.h" |
namespace WebCore { |
@@ -73,6 +77,16 @@ v8::Local<v8::Value> V8ErrorHandler::callListenerFunction(ScriptExecutionContext |
return returnValue; |
} |
+// static |
+void V8ErrorHandler::storeExceptionOnErrorEventWrapper(ErrorEvent* event, v8::Handle<v8::Value> data, v8::Isolate* isolate) |
+{ |
+ v8::Local<v8::Value> wrappedEvent = toV8(event, v8::Handle<v8::Object>(), isolate); |
+ if (!wrappedEvent.IsEmpty()) { |
+ ASSERT(wrappedEvent->IsObject()); |
+ v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data); |
+ } |
+} |
+ |
bool V8ErrorHandler::shouldPreventDefault(v8::Local<v8::Value> returnValue) |
{ |
return returnValue->IsBoolean() && returnValue->BooleanValue(); |