Commit c5e91dfb authored by Robert Sesek's avatar Robert Sesek Committed by Commit Bot

crash_keys: Convert "subresource_url" to the new API.

Bug: 598854
Change-Id: Ie1774cca339e3a0a169cc367e21b113aab6a8b70
Reviewed-on: https://chromium-review.googlesource.com/821250Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523551}
parent 12e9b1cc
...@@ -42,7 +42,6 @@ size_t RegisterWebViewCrashKeys() { ...@@ -42,7 +42,6 @@ size_t RegisterWebViewCrashKeys() {
// content/: // content/:
{"discardable-memory-allocated", kSmallSize}, {"discardable-memory-allocated", kSmallSize},
{"discardable-memory-free", kSmallSize}, {"discardable-memory-free", kSmallSize},
{"subresource_url", kLargeSize},
{"total-discardable-memory-allocated", kSmallSize}, {"total-discardable-memory-allocated", kSmallSize},
{kViewCount, kSmallSize}, {kViewCount, kSmallSize},
......
...@@ -86,7 +86,6 @@ size_t RegisterCrashKeysHelper() { ...@@ -86,7 +86,6 @@ size_t RegisterCrashKeysHelper() {
// content/: // content/:
{"discardable-memory-allocated", kSmallSize}, {"discardable-memory-allocated", kSmallSize},
{"discardable-memory-free", kSmallSize}, {"discardable-memory-free", kSmallSize},
{"subresource_url", kLargeSize},
{"total-discardable-memory-allocated", kSmallSize}, {"total-discardable-memory-allocated", kSmallSize},
{kViewCount, kSmallSize}, {kViewCount, kSmallSize},
......
...@@ -66,7 +66,6 @@ size_t RegisterChromeCrashKeys() { ...@@ -66,7 +66,6 @@ size_t RegisterChromeCrashKeys() {
// content/: // content/:
{"discardable-memory-allocated", kSmallSize}, {"discardable-memory-allocated", kSmallSize},
{"discardable-memory-free", kSmallSize}, {"discardable-memory-free", kSmallSize},
{"subresource_url", kLargeSize},
{"total-discardable-memory-allocated", kSmallSize}, {"total-discardable-memory-allocated", kSmallSize},
{kViewCount, kSmallSize}, {kViewCount, kSmallSize},
......
...@@ -35,7 +35,6 @@ size_t RegisterCastCrashKeys() { ...@@ -35,7 +35,6 @@ size_t RegisterCastCrashKeys() {
// content/: // content/:
{"discardable-memory-allocated", ::crash_keys::kSmallSize}, {"discardable-memory-allocated", ::crash_keys::kSmallSize},
{"discardable-memory-free", ::crash_keys::kSmallSize}, {"discardable-memory-free", ::crash_keys::kSmallSize},
{"subresource_url", ::crash_keys::kLargeSize},
{"total-discardable-memory-allocated", ::crash_keys::kSmallSize}, {"total-discardable-memory-allocated", ::crash_keys::kSmallSize},
{"view-count", ::crash_keys::kSmallSize}, {"view-count", ::crash_keys::kSmallSize},
......
...@@ -81,7 +81,10 @@ PepperWebPluginImpl::PepperWebPluginImpl( ...@@ -81,7 +81,10 @@ PepperWebPluginImpl::PepperWebPluginImpl(
init_data_->url = params.url; init_data_->url = params.url;
// Set subresource URL for crash reporting. // Set subresource URL for crash reporting.
base::debug::SetCrashKeyValue("subresource_url", init_data_->url.spec()); static base::debug::CrashKeyString* subresource_url =
base::debug::AllocateCrashKeyString("subresource_url",
base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(subresource_url, init_data_->url.spec());
if (throttler_) if (throttler_)
throttler_->SetWebPlugin(this); throttler_->SetWebPlugin(this);
......
...@@ -515,7 +515,10 @@ void WebMediaPlayerImpl::DoLoad(LoadType load_type, ...@@ -515,7 +515,10 @@ void WebMediaPlayerImpl::DoLoad(LoadType load_type,
} }
// Set subresource URL for crash reporting. // Set subresource URL for crash reporting.
base::debug::SetCrashKeyValue("subresource_url", gurl.spec()); static base::debug::CrashKeyString* subresource_url =
base::debug::AllocateCrashKeyString("subresource_url",
base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(subresource_url, gurl.spec());
// Used for HLS playback. // Used for HLS playback.
loaded_url_ = gurl; loaded_url_ = gurl;
......
...@@ -96,7 +96,10 @@ PP_Bool FlashResource::SetCrashData(PP_Instance instance, ...@@ -96,7 +96,10 @@ PP_Bool FlashResource::SetCrashData(PP_Instance instance,
return PP_TRUE; return PP_TRUE;
} }
case PP_FLASHCRASHKEY_RESOURCE_URL: { case PP_FLASHCRASHKEY_RESOURCE_URL: {
base::debug::SetCrashKeyValue("subresource_url", url_string_var->value()); static base::debug::CrashKeyString* subresource_url =
base::debug::AllocateCrashKeyString(
"subresource_url", base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(subresource_url, url_string_var->value());
return PP_TRUE; return PP_TRUE;
} }
} }
......
...@@ -194,8 +194,12 @@ void PDFResource::SetAccessibilityPageInfo( ...@@ -194,8 +194,12 @@ void PDFResource::SetAccessibilityPageInfo(
} }
void PDFResource::SetCrashData(const char* pdf_url, const char* top_level_url) { void PDFResource::SetCrashData(const char* pdf_url, const char* top_level_url) {
if (pdf_url) if (pdf_url) {
base::debug::SetCrashKeyValue("subresource_url", pdf_url); static base::debug::CrashKeyString* subresource_url =
base::debug::AllocateCrashKeyString("subresource_url",
base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(subresource_url, pdf_url);
}
if (top_level_url) if (top_level_url)
PluginGlobals::Get()->SetActiveURL(top_level_url); PluginGlobals::Get()->SetActiveURL(top_level_url);
} }
......
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