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

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

Issue 2821443002: Revert of Move ScriptState::GetExecutionContext (Part 5) (Closed)
Patch Set: Revert Created 3 years, 8 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/ServiceWorkerClients.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
index b2d60e8eeb69bf33d04919da20fc0c572d8f4194..760b26cf099818a230e189715a0d7cd52ba750b8 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
@@ -10,7 +10,6 @@
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "core/dom/DOMException.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/ExecutionContext.h"
#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerLocation.h"
#include "modules/serviceworkers/ServiceWorkerError.h"
@@ -104,7 +103,7 @@ ServiceWorkerClients::ServiceWorkerClients() {}
ScriptPromise ServiceWorkerClients::get(ScriptState* script_state,
const String& id) {
- ExecutionContext* execution_context = ExecutionContext::From(script_state);
+ ExecutionContext* execution_context = script_state->GetExecutionContext();
// TODO(jungkees): May be null due to worker termination:
// http://crbug.com/413518.
if (!execution_context)
@@ -121,7 +120,7 @@ ScriptPromise ServiceWorkerClients::get(ScriptState* script_state,
ScriptPromise ServiceWorkerClients::matchAll(
ScriptState* script_state,
const ClientQueryOptions& options) {
- ExecutionContext* execution_context = ExecutionContext::From(script_state);
+ ExecutionContext* execution_context = script_state->GetExecutionContext();
// FIXME: May be null due to worker termination: http://crbug.com/413518.
if (!execution_context)
return ScriptPromise();
@@ -141,7 +140,7 @@ ScriptPromise ServiceWorkerClients::matchAll(
}
ScriptPromise ServiceWorkerClients::claim(ScriptState* script_state) {
- ExecutionContext* execution_context = ExecutionContext::From(script_state);
+ ExecutionContext* execution_context = script_state->GetExecutionContext();
// FIXME: May be null due to worker termination: http://crbug.com/413518.
if (!execution_context)
@@ -162,7 +161,7 @@ ScriptPromise ServiceWorkerClients::openWindow(ScriptState* script_state,
const String& url) {
ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
ScriptPromise promise = resolver->Promise();
- ExecutionContext* context = ExecutionContext::From(script_state);
+ ExecutionContext* context = script_state->GetExecutionContext();
KURL parsed_url = KURL(ToWorkerGlobalScope(context)->location()->Url(), url);
if (!parsed_url.IsValid()) {

Powered by Google App Engine
This is Rietveld 408576698