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

Unified Diff: Source/core/events/PromiseRejectionEvent.cpp

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/core/events/PromiseRejectionEvent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/PromiseRejectionEvent.cpp
diff --git a/Source/core/events/PromiseRejectionEvent.cpp b/Source/core/events/PromiseRejectionEvent.cpp
index a688ca8c088e0902764ae9b39fef9165953f1f70..7947362f7ecfced3394c1b701fd91a981f5c9f01 100644
--- a/Source/core/events/PromiseRejectionEvent.cpp
+++ b/Source/core/events/PromiseRejectionEvent.cpp
@@ -53,6 +53,11 @@ const AtomicString& PromiseRejectionEvent::interfaceName() const
return EventNames::PromiseRejectionEvent;
}
+bool PromiseRejectionEvent::canBeDispatchedInWorld(const DOMWrapperWorld& world) const
+{
+ return m_scriptState && m_scriptState->contextIsValid() && m_scriptState->world().worldId() == world.worldId();
+}
+
DEFINE_TRACE(PromiseRejectionEvent)
{
Event::trace(visitor);
« no previous file with comments | « Source/core/events/PromiseRejectionEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698