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

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

Issue 2468853002: Do not kill renderer when enumerateDevices is called from about:blank. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_devices_dispatcher_host.cc
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
index cea286fb55e71a06468c55f4d1fccdd8dd0aca44..28b09810240b4ea3344a235ed16dcdb747ff0dbf 100644
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
@@ -117,6 +117,10 @@ void MediaDevicesDispatcherHost::EnumerateDevices(
return;
}
+ // Ignore requests from unique origins, but do not crash the renderer.
+ if (security_origin.unique())
+ return;
+
if (!MediaStreamManager::IsOriginAllowed(render_process_id_,
security_origin)) {
bad_message::ReceivedBadMessage(render_process_id_,
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_devices_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698