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

Unified Diff: chrome/browser/media/webrtc/tab_capture_access_handler.cc

Issue 2805213002: Fix extension->id() nullptr access at TabCaptureAccessHandler::HandleRequest (Closed)
Patch Set: Created 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc/tab_capture_access_handler.cc
diff --git a/chrome/browser/media/webrtc/tab_capture_access_handler.cc b/chrome/browser/media/webrtc/tab_capture_access_handler.cc
index 7d18ea8bec74ae70703775e727c7d299389842b5..48f4c3471b4474a77b90ee517c13d06fe00a237b 100644
--- a/chrome/browser/media/webrtc/tab_capture_access_handler.cc
+++ b/chrome/browser/media/webrtc/tab_capture_access_handler.cc
@@ -42,9 +42,11 @@ void TabCaptureAccessHandler::HandleRequest(
content::MediaStreamDevices devices;
std::unique_ptr<content::MediaStreamUI> ui;
- if (!extension)
+ if (!extension) {
callback.Run(devices, content::MEDIA_DEVICE_TAB_CAPTURE_FAILURE,
std::move(ui));
+ return;
+ }
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698