Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: Source/core/dom/ErrorEvent.h

Issue 21071003: Trigger `window.onerror` only for exceptions thrown in the same world. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: feedback Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/core/dom/ErrorEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/core/dom/ErrorEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698