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

Unified Diff: third_party/WebKit/Source/modules/nfc/NFC.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/nfc/NFC.cpp
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.cpp b/third_party/WebKit/Source/modules/nfc/NFC.cpp
index 9e21af2d562b30150c5c0b2544d080273534a9ea..52a9ccda8722408a7e25d8d31a45cb4f36114c8d 100644
--- a/third_party/WebKit/Source/modules/nfc/NFC.cpp
+++ b/third_party/WebKit/Source/modules/nfc/NFC.cpp
@@ -11,7 +11,6 @@
#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"
@@ -625,7 +624,7 @@ ScriptPromise NFC::push(ScriptState* script_state,
script_state, DOMException::Create(kSyntaxError));
if (!SetURL(
- ExecutionContext::From(script_state)->GetSecurityOrigin()->ToString(),
+ script_state->GetExecutionContext()->GetSecurityOrigin()->ToString(),
message))
return ScriptPromise::RejectWithDOMException(
script_state, DOMException::Create(kSyntaxError));
@@ -776,7 +775,7 @@ void NFC::OnWatch(const WTF::Vector<uint32_t>& ids,
ScriptPromise NFC::RejectIfNotSupported(ScriptState* script_state) {
String error_message;
- ExecutionContext* context = ExecutionContext::From(script_state);
+ ExecutionContext* context = script_state->GetExecutionContext();
if (!context->IsSecureContext(error_message)) {
return ScriptPromise::RejectWithDOMException(
script_state, DOMException::Create(kSecurityError, error_message));

Powered by Google App Engine
This is Rietveld 408576698