summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-12 04:57:34 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-12 04:57:34 +0000
commitaf9ecaed4b90ff549309aa5e52b9e248b20c5202 (patch)
tree684361af6d5f9b471505689eed7d9acdb721c901
parentc37ad9eadf2ce84095792115f8016478332243b5 (diff)
downloadchromium_src-af9ecaed4b90ff549309aa5e52b9e248b20c5202.zip
chromium_src-af9ecaed4b90ff549309aa5e52b9e248b20c5202.tar.gz
chromium_src-af9ecaed4b90ff549309aa5e52b9e248b20c5202.tar.bz2
[Mac] Log OnChannelError() bt for CHECK in bug 97285.
http://crrev.com/137896 added code to capture RemoveRoute() called during setup of the channel, for instance if a nested call happened during a sync call. This adds the same check for OnChannelError(). BUG=97285 TEST=crash server. Review URL: https://chromiumcodereview.appspot.com/10538093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141615 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/renderer/plugin_channel_host.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/content/renderer/plugin_channel_host.cc b/content/renderer/plugin_channel_host.cc
index 52c9632..009c651 100644
--- a/content/renderer/plugin_channel_host.cc
+++ b/content/renderer/plugin_channel_host.cc
@@ -36,6 +36,9 @@ namespace {
// Breakpad key for the RemoveRoute() backtrace.
const char* kRemoveRouteTraceKey = "remove_route_bt";
+// Breakpad key for the OnChannelError() backtrace.
+const char* kChannelErrorTraceKey = "channel_error_bt";
+
// GetRemoveTrackingFlag() exposes this so that
// WebPluginDelegateProxy::Initialize() can do scoped set/reset. When
// true, RemoveRoute() knows WBDP::Initialize() is on the stack, and
@@ -202,6 +205,16 @@ bool PluginChannelHost::Send(IPC::Message* msg) {
}
void PluginChannelHost::OnChannelError() {
+#if defined(OS_MACOSX)
+ if (remove_tracking) {
+ base::debug::StackTrace trace;
+ size_t count = 0;
+ const void* const* addresses = trace.Addresses(&count);
+ base::mac::SetCrashKeyFromAddresses(
+ base::SysUTF8ToNSString(kChannelErrorTraceKey), addresses, count);
+ }
+#endif
+
NPChannelBase::OnChannelError();
for (ProxyMap::iterator iter = proxies_.begin();