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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/PushManager.cpp

Issue 2815313002: Reland of Move ScriptState::GetExecutionContext (Part 5) (Closed)
Patch Set: 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/push_messaging/PushManager.cpp
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
index 0add47fcb30c73f98b9bd3e1a44340984edd0b9b..454a57fa2b2292a214e84e8764c366e8511fae1a 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
@@ -62,8 +62,8 @@
// The document context is the only reasonable context from which to ask the
// user for permission to use the Push API. The embedder should persist the
// permission so that later calls in different contexts can succeed.
- if (script_state->GetExecutionContext()->IsDocument()) {
- Document* document = ToDocument(script_state->GetExecutionContext());
+ if (ExecutionContext::From(script_state)->IsDocument()) {
+ Document* document = ToDocument(ExecutionContext::From(script_state));
if (!document->domWindow() || !document->GetFrame())
return ScriptPromise::RejectWithDOMException(
script_state,
@@ -96,8 +96,8 @@
ScriptState* script_state,
const PushSubscriptionOptionsInit& options,
ExceptionState& exception_state) {
- if (script_state->GetExecutionContext()->IsDocument()) {
- Document* document = ToDocument(script_state->GetExecutionContext());
+ if (ExecutionContext::From(script_state)->IsDocument()) {
+ Document* document = ToDocument(ExecutionContext::From(script_state));
if (!document->domWindow() || !document->GetFrame())
return ScriptPromise::RejectWithDOMException(
script_state,

Powered by Google App Engine
This is Rietveld 408576698