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

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

Powered by Google App Engine
This is Rietveld 408576698