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

Unified Diff: third_party/WebKit/Source/modules/mediastream/MediaDevices.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/mediastream/MediaDevices.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp b/third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp
index e6f8231cc34092af2fd283de5d6343bd2b307af6..328a3791713a99870abcd4c411ad43d323aedbe0 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp
@@ -10,7 +10,6 @@
#include "core/dom/DOMException.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
-#include "core/dom/ExecutionContext.h"
#include "core/events/Event.h"
#include "modules/mediastream/MediaErrorState.h"
#include "modules/mediastream/MediaStream.h"
@@ -79,7 +78,7 @@ MediaDevices::MediaDevices(ExecutionContext* context)
MediaDevices::~MediaDevices() {}
ScriptPromise MediaDevices::enumerateDevices(ScriptState* script_state) {
- Document* document = ToDocument(ExecutionContext::From(script_state));
+ Document* document = ToDocument(script_state->GetExecutionContext());
UserMediaController* user_media =
UserMediaController::From(document->GetFrame());
if (!user_media)
@@ -104,7 +103,7 @@ ScriptPromise MediaDevices::getUserMedia(ScriptState* script_state,
NavigatorUserMediaErrorCallback* error_callback =
new PromiseErrorCallback(resolver);
- Document* document = ToDocument(ExecutionContext::From(script_state));
+ Document* document = ToDocument(script_state->GetExecutionContext());
UserMediaController* user_media =
UserMediaController::From(document->GetFrame());
if (!user_media)

Powered by Google App Engine
This is Rietveld 408576698