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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.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/NavigatorServiceWorker.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp b/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
index 7efc1f2e437a06776cafce0347a541e23a38aa7d..0f1f3e2b1e04908370e381d934549ad0cfdc9908 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/NavigatorServiceWorker.cpp
@@ -6,7 +6,6 @@
#include "bindings/core/v8/ScriptState.h"
#include "core/dom/Document.h"
-#include "core/dom/ExecutionContext.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Navigator.h"
@@ -55,7 +54,7 @@ ServiceWorkerContainer* NavigatorServiceWorker::serviceWorker(
ScriptState* script_state,
Navigator& navigator,
ExceptionState& exception_state) {
- ExecutionContext* execution_context = ExecutionContext::From(script_state);
+ ExecutionContext* execution_context = script_state->GetExecutionContext();
DCHECK(!navigator.GetFrame() ||
execution_context->GetSecurityOrigin()->CanAccess(
navigator.GetFrame()->GetSecurityContext()->GetSecurityOrigin()));
@@ -67,7 +66,7 @@ ServiceWorkerContainer* NavigatorServiceWorker::serviceWorker(
ScriptState* script_state,
Navigator& navigator,
String& error_message) {
- ExecutionContext* execution_context = ExecutionContext::From(script_state);
+ ExecutionContext* execution_context = script_state->GetExecutionContext();
DCHECK(!navigator.GetFrame() ||
execution_context->GetSecurityOrigin()->CanAccess(
navigator.GetFrame()->GetSecurityContext()->GetSecurityOrigin()));

Powered by Google App Engine
This is Rietveld 408576698