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

Unified Diff: third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp

Issue 1861963004: MediaRecorder: ASSERT-->DCHECK and a tiny cleanup in CanvasCapture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
index 18550f3294dbcee42236eec3210917a5775bc2d6..17c81e4cd2817c6664d5dcac5d16e0729ea5fe59 100644
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
@@ -42,13 +42,13 @@ MediaStream* HTMLCanvasElementCapture::captureStream(HTMLCanvasElement& element,
}
WebMediaStreamTrack track;
- WebSize size(element.width(), element.height());
+ const WebSize size(element.width(), element.height());
OwnPtr<WebCanvasCaptureHandler> handler;
if (givenFrameRate)
handler = adoptPtr(Platform::current()->createCanvasCaptureHandler(size, frameRate, &track));
else
handler = adoptPtr(Platform::current()->createCanvasCaptureHandler(size, kDefaultFrameRate, &track));
- ASSERT(handler);
+
if (!handler) {
exceptionState.throwDOMException(NotSupportedError, "No CanvasCapture handler can be created.");
return nullptr;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698