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

Unified Diff: third_party/WebKit/Source/modules/nfc/NFC.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/nfc/NFC.cpp
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.cpp b/third_party/WebKit/Source/modules/nfc/NFC.cpp
index 52a9ccda8722408a7e25d8d31a45cb4f36114c8d..9e21af2d562b30150c5c0b2544d080273534a9ea 100644
--- a/third_party/WebKit/Source/modules/nfc/NFC.cpp
+++ b/third_party/WebKit/Source/modules/nfc/NFC.cpp
@@ -11,6 +11,7 @@
#include "core/dom/DOMException.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
+#include "core/dom/ExecutionContext.h"
#include "core/frame/LocalDOMWindow.h"
#include "modules/nfc/NFCError.h"
#include "modules/nfc/NFCMessage.h"
@@ -624,7 +625,7 @@
script_state, DOMException::Create(kSyntaxError));
if (!SetURL(
- script_state->GetExecutionContext()->GetSecurityOrigin()->ToString(),
+ ExecutionContext::From(script_state)->GetSecurityOrigin()->ToString(),
message))
return ScriptPromise::RejectWithDOMException(
script_state, DOMException::Create(kSyntaxError));
@@ -775,7 +776,7 @@
ScriptPromise NFC::RejectIfNotSupported(ScriptState* script_state) {
String error_message;
- ExecutionContext* context = script_state->GetExecutionContext();
+ ExecutionContext* context = ExecutionContext::From(script_state);
if (!context->IsSecureContext(error_message)) {
return ScriptPromise::RejectWithDOMException(
script_state, DOMException::Create(kSecurityError, error_message));

Powered by Google App Engine
This is Rietveld 408576698