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

Unified Diff: third_party/WebKit/Source/modules/webshare/NavigatorShare.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
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
index 34cbe237bc19fe4798a62dfccaaffeb254e3a4e6..861905a9179fcb79b444e963812dbd240deae3d1 100644
--- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
+++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
@@ -7,7 +7,6 @@
#include "core/dom/DOMException.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/ExecutionContext.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Navigator.h"
#include "modules/webshare/ShareData.h"
@@ -105,7 +104,7 @@ const char* NavigatorShare::SupplementName() {
ScriptPromise NavigatorShare::share(ScriptState* script_state,
const ShareData& share_data) {
String error_message;
- if (!ExecutionContext::From(script_state)->IsSecureContext(error_message)) {
+ if (!script_state->GetExecutionContext()->IsSecureContext(error_message)) {
DOMException* error = DOMException::Create(kSecurityError, error_message);
return ScriptPromise::RejectWithDOMException(script_state, error);
}
@@ -116,7 +115,7 @@ ScriptPromise NavigatorShare::share(ScriptState* script_state,
return ScriptPromise::RejectWithDOMException(script_state, error);
}
- Document* doc = ToDocument(ExecutionContext::From(script_state));
+ Document* doc = ToDocument(script_state->GetExecutionContext());
DCHECK(doc);
if (!service_) {
LocalFrame* frame = doc->GetFrame();
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698