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

Unified Diff: content/browser/tab_contents/navigation_controller.cc

Issue 8418043: Temporary code to track down increase in renderer crashes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/navigation_controller.cc
===================================================================
--- content/browser/tab_contents/navigation_controller.cc (revision 107831)
+++ content/browser/tab_contents/navigation_controller.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/file_util.h"
#include "base/logging.h"
+#include "base/string_number_conversions.h" // Temporary
#include "base/string_util.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -13,6 +14,7 @@
#include "content/browser/browser_url_handler.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/in_process_webkit/session_storage_namespace.h"
+#include "content/browser/renderer_host/render_view_host.h" // Temporary
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/navigation_details.h"
@@ -671,6 +673,24 @@
// release builds. Instead, we'll kill the renderer process to be safe.
LOG(ERROR) << "terminating renderer for bad navigation: " << params.url;
UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_NC"));
+
+ // Temporary code so we can get more information:
+ std::string temp = params.url.spec();;
+ temp.append("#");
+ temp.append(params.referrer.spec());
+ temp.append("#");
+ temp.append(base::IntToString(params.page_id));
+ for (int i = static_cast<int>(entries_.size()) - 1; i >= 0; --i) {
+ if (entries_[i]->site_instance() == tab_contents_->GetSiteInstance()) {
+ temp.append("#");
+ temp.append(base::IntToString(entries_[i]->page_id()));
+ }
+ }
+ GURL url(temp);
+ tab_contents_->render_view_host()->Send(new ViewMsg_TempCrashWithData(url));
+ return content::NAVIGATION_TYPE_NAV_IGNORE;
+
+
if (tab_contents_->GetSiteInstance()->HasProcess())
tab_contents_->GetSiteInstance()->GetProcess()->ReceivedBadMessage();
return content::NAVIGATION_TYPE_NAV_IGNORE;
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698