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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 647623003: Add a crash-hunting CHECK() in RenderProcessHostImpl::AddRoute() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 } 916 }
917 917
918 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { 918 ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() {
919 DCHECK(mojo_application_host_); 919 DCHECK(mojo_application_host_);
920 return mojo_application_host_->service_registry(); 920 return mojo_application_host_->service_registry();
921 } 921 }
922 922
923 void RenderProcessHostImpl::AddRoute( 923 void RenderProcessHostImpl::AddRoute(
924 int32 routing_id, 924 int32 routing_id,
925 IPC::Listener* listener) { 925 IPC::Listener* listener) {
926 // We already have DCHECK() in IDMap. This is for chasing
927 // crbug.com/415059 and can be removed after fixing it.
928 CHECK(!listeners_.Lookup(routing_id));
926 listeners_.AddWithID(listener, routing_id); 929 listeners_.AddWithID(listener, routing_id);
927 } 930 }
928 931
929 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) { 932 void RenderProcessHostImpl::RemoveRoute(int32 routing_id) {
930 DCHECK(listeners_.Lookup(routing_id) != NULL); 933 DCHECK(listeners_.Lookup(routing_id) != NULL);
931 listeners_.Remove(routing_id); 934 listeners_.Remove(routing_id);
932 935
933 #if defined(OS_WIN) 936 #if defined(OS_WIN)
934 // Dump the handle table if handle auditing is enabled. 937 // Dump the handle table if handle auditing is enabled.
935 const base::CommandLine& browser_command_line = 938 const base::CommandLine& browser_command_line =
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 if (worker_ref_count_ == 0) 2255 if (worker_ref_count_ == 0)
2253 Cleanup(); 2256 Cleanup();
2254 } 2257 }
2255 2258
2256 void RenderProcessHostImpl::EnsureMojoActivated() { 2259 void RenderProcessHostImpl::EnsureMojoActivated() {
2257 mojo_activation_required_ = true; 2260 mojo_activation_required_ = true;
2258 MaybeActivateMojo(); 2261 MaybeActivateMojo();
2259 } 2262 }
2260 2263
2261 } // namespace content 2264 } // namespace content
OLDNEW
« 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