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

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

Issue 657613003: RenderHostImpl::AddRoute - Turn a DCHECK to CHECK() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added an Alias() call. 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 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: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 717877410e36859f4c56328a7b64c1d67c30e94b..5b78ad64e2e9ab78f050e6a82c59c8fb3a71103d 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -20,6 +20,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/command_line.h"
+#include "base/debug/alias.h"
#include "base/debug/trace_event.h"
#include "base/files/file.h"
#include "base/lazy_instance.h"
@@ -918,11 +919,33 @@ ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() {
return mojo_application_host_->service_registry();
}
+namespace {
+struct DebugInfoToCapture {
+ public:
+ DebugInfoToCapture(int32 rid, int pid)
+ : routing_id(rid), process_id(pid) {
+ signature[0] = 'I';
+ signature[1] = 'N';
+ signature[2] = 'F';
+ signature[3] = 'O';
+ }
+
+ char signature[4];
+ int32 routing_id;
+ int process_id;
+};
+}
+
void RenderProcessHostImpl::AddRoute(
int32 routing_id,
IPC::Listener* listener) {
- DCHECK(widget_helper_->IsRoutingIDProbablyValid(routing_id))
- << "Found Routing ID conflicts: " << routing_id;
+ DebugInfoToCapture info(routing_id, GetID());
+ base::debug::Alias(&info);
+ CHECK(widget_helper_->IsRoutingIDProbablyValid(routing_id))
+ << "Found Invalid Routing ID: " << routing_id;
+ CHECK(!listeners_.Lookup(routing_id))
+ << "Found Routing ID conflicts: " << routing_id
+ << " with Child PID: " << GetID();
listeners_.AddWithID(listener, routing_id);
}
« 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