Commit 8c38058b authored by creis@chromium.org's avatar creis@chromium.org

Get additional crash data to narrow down renderer kills.

BUG=102408
TEST=More data in OnTempCrashWithData dumps.


Review URL: http://codereview.chromium.org/8776017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112625 0039d316-1c4b-4281-b951-d872f2087c98
parent 8b21196a
......@@ -675,8 +675,8 @@ content::NavigationType NavigationController::ClassifyNavigation(
UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_NC"));
// Temporary code so we can get more information. Format:
// http://url/foo.html#page1#max3#frame1#ids:2,x,3
std::string temp = params.url.spec();;
// http://url/foo.html#page1#max3#frame1#ids:2_Nx,1_1x,3_2
std::string temp = params.url.spec();
temp.append("#page");
temp.append(base::IntToString(params.page_id));
temp.append("#max");
......@@ -685,10 +685,17 @@ content::NavigationType NavigationController::ClassifyNavigation(
temp.append(base::IntToString(params.frame_id));
temp.append("#ids");
for (int i = 0; i < static_cast<int>(entries_.size()); ++i) {
// Append all same-process page_ids (with placeholders for out of process)
if (entries_[i]->site_instance() == tab_contents_->GetSiteInstance())
temp.append(base::IntToString(entries_[i]->page_id()));
// Append entry metadata (e.g., 3_7x):
// 3: page_id
// 7: SiteInstance ID, or N for null
// x: appended if not from the current SiteInstance
temp.append(base::IntToString(entries_[i]->page_id()));
temp.append("_");
if (entries_[i]->site_instance())
temp.append(base::IntToString(entries_[i]->site_instance()->id()));
else
temp.append("N");
if (entries_[i]->site_instance() != tab_contents_->GetSiteInstance())
temp.append("x");
temp.append(",");
}
......
......@@ -17,6 +17,7 @@
#include "base/metrics/histogram.h"
#include "base/metrics/stats_table.h"
#include "base/shared_memory.h"
#include "base/string_number_conversions.h" // Temporary
#include "base/task.h"
#include "base/threading/thread_local.h"
#include "base/values.h"
......@@ -839,7 +840,12 @@ void RenderThreadImpl::OnNetworkStateChanged(bool online) {
}
void RenderThreadImpl::OnTempCrashWithData(const GURL& data) {
content::GetContentClient()->SetActiveURL(data);
// Append next_page_id_ to the data from the browser.
std::string temp = data.spec();
temp.append("#next");
temp.append(base::IntToString(RenderViewImpl::next_page_id()));
content::GetContentClient()->SetActiveURL(GURL(temp));
CHECK(false);
}
......
......@@ -178,6 +178,12 @@ class RenderViewImpl : public RenderWidget,
// Sets the "next page id" counter.
static void SetNextPageID(int32 next_page_id);
// TODO(creis): Remove when we no longer need
// RenderThreadImpl::OnTempCrashWithData.
static int32 next_page_id() {
return next_page_id_;
}
// May return NULL when the view is closing.
CONTENT_EXPORT WebKit::WebView* webview() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment