Bug 1423261: Backout diagnostics changeset 58ddcf890331. r=backout
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Tue, 17 Apr 2018 21:38:14 -0400
changeset 414217 d86b5b69f86745f0d9f505f633f48d1bf2ab45e1
parent 414216 2a2282923b5abdf8b95bad5a59e694ac8e744883
child 414218 c8842b205236ab4e73ffa1892c00fe379bfd9efd
push id33861
push userccoroiu@mozilla.com
push dateWed, 18 Apr 2018 10:50:38 +0000
treeherdermozilla-central@4af4ae0aee55 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1423261
milestone61.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 1423261: Backout diagnostics changeset 58ddcf890331. r=backout
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2154,70 +2154,16 @@ ContentParent::~ContentParent()
   if (IsForJSPlugin()) {
     MOZ_ASSERT(!sJSPluginContentParents ||
                !sJSPluginContentParents->Get(mJSPluginID));
   } else {
     MOZ_ASSERT(!sBrowserContentParents ||
                !sBrowserContentParents->Contains(mRemoteType) ||
                !sBrowserContentParents->Get(mRemoteType)->Contains(this));
   }
-#ifdef NIGHTLY_BUILD
-  MessageChannel* channel = GetIPCChannel();
-
-  if (channel && !channel->Unsound_IsClosed()) {
-    nsString friendlyName;
-    FriendlyName(friendlyName, false);
-
-    AddRef();
-    nsrefcnt refcnt = Release();
-    uint32_t numQueuedMessages = 0;
-    numQueuedMessages = channel->Unsound_NumQueuedMessages();
-
-    nsPrintfCString msg("queued-ipc-messages/content-parent"
-                        "(%s, pid=%d, %s, 0x%p, refcnt=%" PRIuPTR
-                        ", numQueuedMessages=%d, remoteType=%s, "
-                        "mCalledClose=%s, mCalledKillHard=%s, "
-                        "mShutdownPending=%s, mIPCOpen=%s)",
-                        NS_ConvertUTF16toUTF8(friendlyName).get(),
-                        Pid(), "open channel",
-                        static_cast<nsIContentParent*>(this), refcnt,
-                        numQueuedMessages,
-                        NS_ConvertUTF16toUTF8(mRemoteType).get(),
-                        mCalledClose ? "true" : "false",
-                        mCalledKillHard ? "true" : "false",
-                        mShutdownPending ? "true" : "false",
-                        mIPCOpen ? "true" : "false");
-    CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("IPCFatalErrorMsg"),
-                                       msg);
-    switch (channel->GetChannelState__TotallyRacy()) {
-        case ChannelOpening:
-            MOZ_CRASH("MessageChannel destroyed without being closed " \
-                      "(mChannelState == ChannelOpening).");
-            break;
-        case ChannelConnected:
-            MOZ_CRASH("MessageChannel destroyed without being closed " \
-                      "(mChannelState == ChannelConnected).");
-            break;
-        case ChannelTimeout:
-            MOZ_CRASH("MessageChannel destroyed without being closed " \
-                      "(mChannelState == ChannelTimeout).");
-            break;
-        case ChannelClosing:
-            MOZ_CRASH("MessageChannel destroyed without being closed " \
-                      "(mChannelState == ChannelClosing).");
-            break;
-        case ChannelError:
-            MOZ_CRASH("MessageChannel destroyed without being closed " \
-                      "(mChannelState == ChannelError).");
-            break;
-        default:
-            MOZ_CRASH("MessageChannel destroyed without being closed.");
-    }
-  }
-#endif
 }
 
 void
 ContentParent::InitInternal(ProcessPriority aInitialPriority)
 {
   Telemetry::Accumulate(Telemetry::CONTENT_PROCESS_LAUNCH_TIME_MS,
                         static_cast<uint32_t>((TimeStamp::Now() - mLaunchTS)
                                               .ToMilliseconds()));