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

Unified Diff: Source/modules/mediastream/MediaDevicesRequest.cpp

Issue 1200783002: Address Peter's comments from past review (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « LayoutTests/fast/mediastream/MediaDevices-enumerateDevices.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/MediaDevicesRequest.cpp
diff --git a/Source/modules/mediastream/MediaDevicesRequest.cpp b/Source/modules/mediastream/MediaDevicesRequest.cpp
index 6987d42f00f279911f64925e96eb9d56206c2d0f..cc90a0e795a825e75a431b523c69f758fe52fd43 100644
--- a/Source/modules/mediastream/MediaDevicesRequest.cpp
+++ b/Source/modules/mediastream/MediaDevicesRequest.cpp
@@ -65,13 +65,10 @@ Document* MediaDevicesRequest::ownerDocument()
ScriptPromise MediaDevicesRequest::start()
{
- if (m_controller) {
- m_resolver->keepAliveWhilePending();
- m_controller->requestMediaDevices(this);
- return m_resolver->promise();
- }
-
- return ScriptPromise::rejectWithDOMException(m_resolver->scriptState(), DOMException::create(NotSupportedError, "No media device controller available"));
+ ASSERT(m_controller);
+ m_resolver->keepAliveWhilePending();
+ m_controller->requestMediaDevices(this);
+ return m_resolver->promise();
}
void MediaDevicesRequest::succeed(const MediaDeviceInfoVector& mediaDevices)
« no previous file with comments | « LayoutTests/fast/mediastream/MediaDevices-enumerateDevices.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698