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

Unified Diff: third_party/WebKit/Source/modules/vr/VRDisplay.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/vr/VRDisplay.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
index b95812fe090b2a5925a80d374ba39a1620f31ee9..553622a0dfa064f16522cfd8694dc7834f1abb48 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
@@ -36,6 +36,7 @@
#include "public/platform/Platform.h"
#include <array>
+#include "core/dom/ExecutionContext.h"
namespace blink {
@@ -177,7 +178,7 @@
ScriptPromise VRDisplay::requestPresent(ScriptState* script_state,
const HeapVector<VRLayer>& layers) {
- ExecutionContext* execution_context = script_state->GetExecutionContext();
+ ExecutionContext* execution_context = ExecutionContext::From(script_state);
UseCounter::Count(execution_context, UseCounter::kVRRequestPresent);
if (!execution_context->IsSecureContext()) {
UseCounter::Count(execution_context,
@@ -278,7 +279,7 @@
pending_present_resolvers_.push_back(resolver);
} else if (first_present) {
bool secure_context =
- script_state->GetExecutionContext()->IsSecureContext();
+ ExecutionContext::From(script_state)->IsSecureContext();
if (!display_) {
ForceExitPresent();
DOMException* exception = DOMException::Create(

Powered by Google App Engine
This is Rietveld 408576698