diff --git a/brightray/browser/media/media_capture_devices_dispatcher.cc b/brightray/browser/media/media_capture_devices_dispatcher.cc index 65ea4b94be..e38770024d 100644 --- a/brightray/browser/media/media_capture_devices_dispatcher.cc +++ b/brightray/browser/media/media_capture_devices_dispatcher.cc @@ -159,7 +159,6 @@ void MediaCaptureDevicesDispatcher::OnAudioStreamStopped( void MediaCaptureDevicesDispatcher::OnCreatingAudioStream( int render_process_id, int render_view_id) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); } } // namespace brightray diff --git a/brightray/browser/media/media_stream_devices_controller.cc b/brightray/browser/media/media_stream_devices_controller.cc index fc867f075b..b55e73844f 100644 --- a/brightray/browser/media/media_stream_devices_controller.cc +++ b/brightray/browser/media/media_stream_devices_controller.cc @@ -189,11 +189,12 @@ void MediaStreamDevicesController::HandleUserMediaRequest() { screen_id.ToString(), "Screen")); } - callback_.Run( - devices, - devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : - content::MEDIA_DEVICE_OK, - scoped_ptr()); + content::MediaResponseCallback cb = callback_; + callback_.Reset(); + cb.Run(devices, + devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE : + content::MEDIA_DEVICE_OK, + scoped_ptr()); } } // namespace brightray