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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 92873004: Prevent the browser process from creating duplicate RenderViewHosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 7 years 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/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 67b3b1f22844cb16cf2282da6a2dd40c59bca25f..4afc405011a5e1d36a2e831d45ddb167e17e9ac5 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -212,9 +212,10 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
is_threaded_compositing_enabled_ = IsThreadedCompositingEnabled();
-
- g_routing_id_widget_map.Get().insert(std::make_pair(
- RenderWidgetHostID(process->GetID(), routing_id_), this));
+ std::pair<RoutingIDWidgetMap::iterator, bool> result =
+ g_routing_id_widget_map.Get().insert(std::make_pair(
+ RenderWidgetHostID(process->GetID(), routing_id_), this));
+ CHECK(result.second) << "Inserting a duplicate item!";
process_->AddRoute(routing_id_, this);
// If we're initially visible, tell the process host that we're alive.
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698