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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.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/modules/serviceworkers/ServiceWorkerContainer.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index ca34c934db6fde75f627566dce56db9d4971f728..9a8137b855cb81d3eec9c9d3681e6a2a8061561e 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -41,6 +41,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
#include "core/dom/MessagePort.h"
+#include "core/events/MessageEvent.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/UseCounter.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
@@ -48,7 +49,6 @@
#include "modules/serviceworkers/ServiceWorker.h"
#include "modules/serviceworkers/ServiceWorkerContainerClient.h"
#include "modules/serviceworkers/ServiceWorkerError.h"
-#include "modules/serviceworkers/ServiceWorkerMessageEvent.h"
#include "modules/serviceworkers/ServiceWorkerRegistration.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/weborigin/SchemeRegistry.h"
@@ -449,9 +449,9 @@ void ServiceWorkerContainer::dispatchMessageEvent(
RefPtr<SerializedScriptValue> value = SerializedScriptValue::create(message);
ServiceWorker* source = ServiceWorker::from(
getExecutionContext(), WTF::wrapUnique(handle.release()));
- dispatchEvent(ServiceWorkerMessageEvent::create(
- ports, value, source,
- getExecutionContext()->getSecurityOrigin()->toString()));
+ dispatchEvent(MessageEvent::create(
+ ports, value, getExecutionContext()->getSecurityOrigin()->toString(),
+ String() /* lastEventId */, source, String() /* suborigin */));
}
const AtomicString& ServiceWorkerContainer::interfaceName() const {

Powered by Google App Engine
This is Rietveld 408576698