Bug 1281223 - Debug instrumentation for capturing accidental destruction of the ContentChild instance. r=billm
☠☠ backed out by 0b40f1aa596a ☠ ☠
authorCervantes Yu <cyu@mozilla.com>
Thu, 28 Jul 2016 19:17:04 +0800
changeset 347064 d45c9f5c4bc84a796e60eb39e4712d434ade89c2
parent 347063 0b81459b4802fc968d47e6f551224416231d3b5e
child 347065 db2c7f11d17142b488396e5e3c39a31520b36139
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1281223
milestone50.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 1281223 - Debug instrumentation for capturing accidental destruction of the ContentChild instance. r=billm MozReview-Commit-ID: 5LozIBYXLeO
dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -574,16 +574,19 @@ ContentChild::ContentChild()
 {
   // This process is a content process, so it's clearly running in
   // multiprocess mode!
   nsDebugImpl::SetMultiprocessMode("Child");
 }
 
 ContentChild::~ContentChild()
 {
+#ifndef NS_FREE_PERMANENT_DATA
+  MOZ_CRASH("Content Child shouldn't be destroyed.");
+#endif
 }
 
 NS_INTERFACE_MAP_BEGIN(ContentChild)
   NS_INTERFACE_MAP_ENTRY(nsIContentChild)
   NS_INTERFACE_MAP_ENTRY(nsIWindowProvider)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentChild)
 NS_INTERFACE_MAP_END