Index: Source/core/dom/ErrorEvent.h |
diff --git a/Source/core/dom/ErrorEvent.h b/Source/core/dom/ErrorEvent.h |
index 583f07fe1a4d475b31763e390402b9c1d7c7c7f9..8dc5de4c1c100515f804a643db7b2a5ff3df33e2 100644 |
--- a/Source/core/dom/ErrorEvent.h |
+++ b/Source/core/dom/ErrorEvent.h |
@@ -36,6 +36,8 @@ |
namespace WebCore { |
+class DOMWrapperWorld; |
+ |
struct ErrorEventInit : public EventInit { |
ErrorEventInit(); |
@@ -51,9 +53,9 @@ 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, 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) |
{ |
@@ -61,7 +63,7 @@ public: |
} |
static PassRefPtr<ErrorEvent> createSanitizedError() |
adamk
2013/09/05 19:24:20
What is this used for? Why is passing 0 for world
Mike West
2013/09/06 11:57:03
This is used for cross-origin onerror messages: th
|
{ |
- return adoptRef(new ErrorEvent("Script error.", String(), 0, 0)); |
+ return adoptRef(new ErrorEvent("Script error.", String(), 0, 0, 0)); |
} |
virtual ~ErrorEvent(); |
@@ -76,11 +78,13 @@ public: |
virtual const AtomicString& interfaceName() const; |
+ 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, DOMWrapperWorld*); |
ErrorEvent(const AtomicString&, const ErrorEventInit&); |
String m_unsanitizedMessage; |
@@ -88,6 +92,8 @@ private: |
String m_fileName; |
unsigned m_lineNumber; |
unsigned m_columnNumber; |
+ |
+ DOMWrapperWorld* m_world; |
adamk
2013/09/05 19:24:20
Seems a little bit scary to skip a RefPtr here. As
Mike West
2013/09/06 11:57:03
No good reason, as long as there aren't any side-e
|
}; |
} // namespace WebCore |