Bug 1128454 - When plugin bridging mysteriously fails, log the ipc channel state along with the nsresult error code. r=billm
authorJim Mathies <jmathies@mozilla.com>
Wed, 15 Jul 2015 14:47:14 -0500
changeset 253050 dabb386000f889f74eb033f3825d88cbc768380a
parent 253049 c211fdfbfc02fffb89dbdce4b1bf689d6c8cd07e
child 253051 f7eb7bc6a99c8a2fea9f455a8221f9bf80d673b5
push id62327
push userjmathies@mozilla.com
push dateWed, 15 Jul 2015 19:50:21 +0000
treeherdermozilla-inbound@dabb386000f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1128454
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1128454 - When plugin bridging mysteriously fails, log the ipc channel state along with the nsresult error code. r=billm
dom/plugins/ipc/PluginModuleParent.cpp
ipc/glue/MessageChannel.h
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -130,17 +130,17 @@ mozilla::plugins::SetupBridge(uint32_t a
         return true;
     }
     *rv = PPluginModule::Bridge(aContentParent, chromeParent);
     if (NS_FAILED(*rv)) {
 #if defined(MOZ_CRASHREPORTER)
         // We are going to abort due to the failure, lets note the cause
         // in the report for diagnosing.
         nsAutoCString error;
-        error.AppendPrintf("%X", *rv);
+        error.AppendPrintf("%X %d", *rv, chromeParent->GetIPCChannel()->GetChannelState__TotallyRacy());
         CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("BridgePluginError"), error);
 #endif
       return false;
     }
     return true;
 }
 
 #ifdef MOZ_CRASHREPORTER_INJECTOR
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -124,16 +124,21 @@ class MessageChannel : HasResultCodes
     // Make an Interrupt call to the other side of the channel
     bool Call(Message* aMsg, Message* aReply);
 
     // Wait until a message is received
     bool WaitForIncomingMessage();
 
     bool CanSend() const;
 
+    // Currently only for debugging purposes, doesn't aquire mMonitor.
+    ChannelState GetChannelState__TotallyRacy() const {
+        return mChannelState;
+    }
+
     void SetReplyTimeoutMs(int32_t aTimeoutMs);
 
     bool IsOnCxxStack() const {
         return !mCxxStackFrames.empty();
     }
 
     void CancelCurrentTransaction();