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

Unified Diff: third_party/WebKit/Source/core/events/MessageEvent.cpp

Issue 2466513002: Deprecate ServiceWorkerMessageEvent in favor of MessageEvent (Closed)
Patch Set: Rebase and update cross-origin-objects-exceptions-expected.txt Created 4 years 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
Index: third_party/WebKit/Source/core/events/MessageEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MessageEvent.cpp b/third_party/WebKit/Source/core/events/MessageEvent.cpp
index 2be9e88218e66332a4859e41566290e8a8881add..ed0b6285e8391796d0351fdda73df83b1d6ec8cb 100644
--- a/third_party/WebKit/Source/core/events/MessageEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MessageEvent.cpp
@@ -36,7 +36,8 @@
namespace blink {
static inline bool isValidSource(EventTarget* source) {
- return !source || source->toLocalDOMWindow() || source->toMessagePort();
+ return !source || source->toLocalDOMWindow() || source->toMessagePort() ||
+ source->toServiceWorker();
}
MessageEvent::MessageEvent() : m_dataType(DataTypeScriptValue) {}
@@ -155,7 +156,7 @@ void MessageEvent::initMessageEvent(const AtomicString& type,
ScriptValue data,
const String& origin,
const String& lastEventId,
- DOMWindow* source,
+ EventTarget* source,
MessagePortArray* ports) {
if (isBeingDispatched())
return;
@@ -177,7 +178,7 @@ void MessageEvent::initMessageEvent(const AtomicString& type,
PassRefPtr<SerializedScriptValue> data,
const String& origin,
const String& lastEventId,
- DOMWindow* source,
+ EventTarget* source,
MessagePortArray* ports) {
if (isBeingDispatched())
return;
« no previous file with comments | « third_party/WebKit/Source/core/events/MessageEvent.h ('k') | third_party/WebKit/Source/core/events/MessageEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698