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 a338af74f49c37716ccde2631ec1d372ea93f5cc..0ba9da021e13ee62e5ab337c839716887102aa77 100644 |
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp |
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp |
@@ -55,12 +55,13 @@ MediaStream* HTMLCanvasElementCapture::captureStream( |
WebMediaStreamTrack track; |
const WebSize size(element.width(), element.height()); |
std::unique_ptr<WebCanvasCaptureHandler> handler; |
- if (given_frame_rate) |
- handler = WTF::WrapUnique(Platform::Current()->CreateCanvasCaptureHandler( |
- size, frame_rate, &track)); |
- else |
- handler = WTF::WrapUnique(Platform::Current()->CreateCanvasCaptureHandler( |
- size, kDefaultFrameRate, &track)); |
+ if (given_frame_rate) { |
+ handler = Platform::Current()->CreateCanvasCaptureHandler(size, frame_rate, |
+ &track); |
+ } else { |
+ handler = Platform::Current()->CreateCanvasCaptureHandler( |
+ size, kDefaultFrameRate, &track); |
+ } |
if (!handler) { |
exception_state.ThrowDOMException( |