Index: Source/core/dom/ErrorEvent.h |
diff --git a/Source/core/dom/ErrorEvent.h b/Source/core/dom/ErrorEvent.h |
index 583f07fe1a4d475b31763e390402b9c1d7c7c7f9..34b8a42497e7a9e34fae45b45dbbb9760abc0980 100644 |
--- a/Source/core/dom/ErrorEvent.h |
+++ b/Source/core/dom/ErrorEvent.h |
@@ -31,7 +31,9 @@ |
#ifndef ErrorEvent_h |
#define ErrorEvent_h |
+#include "bindings/v8/DOMWrapperWorld.h" |
#include "core/dom/Event.h" |
+#include "wtf/RefPtr.h" |
#include "wtf/text/WTFString.h" |
namespace WebCore { |
@@ -51,17 +53,17 @@ public: |
{ |
return adoptRef(new ErrorEvent); |
} |
- static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber) |
+ static PassRefPtr<ErrorEvent> create(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber, PassRefPtr<DOMWrapperWorld> world) |
{ |
- return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumber)); |
+ return adoptRef(new ErrorEvent(message, fileName, lineNumber, columnNumber, world)); |
} |
static PassRefPtr<ErrorEvent> create(const AtomicString& type, const ErrorEventInit& initializer) |
{ |
return adoptRef(new ErrorEvent(type, initializer)); |
} |
- static PassRefPtr<ErrorEvent> createSanitizedError() |
+ static PassRefPtr<ErrorEvent> createSanitizedError(PassRefPtr<DOMWrapperWorld> world) |
{ |
- return adoptRef(new ErrorEvent("Script error.", String(), 0, 0)); |
+ return adoptRef(new ErrorEvent("Script error.", String(), 0, 0, world)); |
} |
virtual ~ErrorEvent(); |
@@ -76,11 +78,13 @@ public: |
virtual const AtomicString& interfaceName() const; |
+ PassRefPtr<DOMWrapperWorld> world() const { return m_world; } |
+ |
void setUnsanitizedMessage(const String&); |
private: |
ErrorEvent(); |
- ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber); |
+ ErrorEvent(const String& message, const String& fileName, unsigned lineNumber, unsigned columnNumber, PassRefPtr<DOMWrapperWorld>); |
ErrorEvent(const AtomicString&, const ErrorEventInit&); |
String m_unsanitizedMessage; |
@@ -88,6 +92,8 @@ private: |
String m_fileName; |
unsigned m_lineNumber; |
unsigned m_columnNumber; |
+ |
+ RefPtr<DOMWrapperWorld> m_world; |
}; |
} // namespace WebCore |