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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp

Issue 2691333002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp
index f3eeaf72b214a424a60efe2d49fc6fc6f4ce84b7..824dce3d02fb6603bf68cb2305ba2d0e79f0ce8f 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp
@@ -30,7 +30,9 @@
#include "modules/serviceworkers/ServiceWorker.h"
+#include <memory>
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/ScriptState.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/MessagePort.h"
#include "core/events/Event.h"
@@ -40,7 +42,6 @@
#include "public/platform/WebSecurityOrigin.h"
#include "public/platform/WebString.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerState.h"
-#include <memory>
namespace blink {
@@ -48,7 +49,7 @@ const AtomicString& ServiceWorker::interfaceName() const {
return EventTargetNames::ServiceWorker;
}
-void ServiceWorker::postMessage(ExecutionContext* context,
+void ServiceWorker::postMessage(ScriptState* scriptState,
PassRefPtr<SerializedScriptValue> message,
const MessagePortArray& ports,
ExceptionState& exceptionState) {
@@ -63,7 +64,8 @@ void ServiceWorker::postMessage(ExecutionContext* context,
// Disentangle the port in preparation for sending it to the remote context.
std::unique_ptr<MessagePortChannelArray> channels =
- MessagePort::disentanglePorts(context, ports, exceptionState);
+ MessagePort::disentanglePorts(scriptState->getExecutionContext(), ports,
+ exceptionState);
if (exceptionState.hadException())
return;
if (m_handle->serviceWorker()->state() == WebServiceWorkerStateRedundant) {

Powered by Google App Engine
This is Rietveld 408576698