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

Unified Diff: third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp

Issue 2571093002: MediaRecoder: only throw exception from requestData() if state is inactive (Closed)
Patch Set: Created 4 years 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/LayoutTests/fast/mediarecorder/MediaRecorder-events-and-exceptions.html ('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/mediarecorder/MediaRecorder.cpp
diff --git a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
index a3ca3de080ccad1628373f0f8e50e714835be3f0..02a4f5103649df8235ea3417e8a04e713d95f60b 100644
--- a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
+++ b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
@@ -274,7 +274,7 @@ void MediaRecorder::resume(ExceptionState& exceptionState) {
}
void MediaRecorder::requestData(ExceptionState& exceptionState) {
- if (m_state != State::Recording) {
+ if (m_state == State::Inactive) {
exceptionState.throwDOMException(
InvalidStateError,
"The MediaRecorder's state is '" + stateToString(m_state) + "'.");
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-events-and-exceptions.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698