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

Unified Diff: content/browser/renderer_host/media/service_video_capture_device_launcher.cc

Issue 2867213004: [Mojo Video Capture] Hook up video capture service behind a feature flag (Closed)
Patch Set: Rebase to May 19th Created 3 years, 7 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: content/browser/renderer_host/media/service_video_capture_device_launcher.cc
diff --git a/content/browser/renderer_host/media/service_video_capture_device_launcher.cc b/content/browser/renderer_host/media/service_video_capture_device_launcher.cc
index b74cf52865a5a817f84c712489d31c1dc6316391..4c86c448638cc39f1665e20a9a52664c24e6452e 100644
--- a/content/browser/renderer_host/media/service_video_capture_device_launcher.cc
+++ b/content/browser/renderer_host/media/service_video_capture_device_launcher.cc
@@ -88,9 +88,12 @@ void ServiceVideoCaptureDeviceLauncher::LaunchDeviceAsync(
return;
}
video_capture::mojom::DevicePtr device;
+ // We need the temporary variable |device_request| in order to guarantee that
+ // mojo::MakeRequest(&device) happens before base::Passed(&device).
+ auto device_request = mojo::MakeRequest(&device);
(*device_factory_)
->CreateDevice(
- device_id, mojo::MakeRequest(&device),
+ device_id, std::move(device_request),
base::Bind(
// Use of Unretained |this| is safe, because |done_cb| guarantees
// that |this| stays alive.

Powered by Google App Engine
This is Rietveld 408576698