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

Unified Diff: Source/core/events/Event.h

Issue 1218733003: Restrict PromiseRejectionEvents to their originating world (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/core/v8/V8AbstractEventListener.cpp ('k') | Source/core/events/PromiseRejectionEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/Event.h
diff --git a/Source/core/events/Event.h b/Source/core/events/Event.h
index 6242b0b67a6a3448137d54d82abe4500354dd832..1542b7a0d821499a05bea9b007f7addda3b1eafb 100644
--- a/Source/core/events/Event.h
+++ b/Source/core/events/Event.h
@@ -35,6 +35,7 @@
namespace blink {
+class DOMWrapperWorld;
class EventTarget;
class ExecutionContext;
@@ -185,6 +186,10 @@ public:
double uiCreateTime() const { return m_uiCreateTime; }
void setUICreateTime(double uiCreateTime) { m_uiCreateTime = uiCreateTime; }
+ // Events that must not leak across isolated world, similar to how
+ // ErrorEvent behaves, can override this method.
+ virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { return true; }
+
DECLARE_VIRTUAL_TRACE();
protected:
« no previous file with comments | « Source/bindings/core/v8/V8AbstractEventListener.cpp ('k') | Source/core/events/PromiseRejectionEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698