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 332098 d45c9f5c4bc84a796e60eb39e4712d434ade89c2
parent 332097 0b81459b4802fc968d47e6f551224416231d3b5e
child 332099 db2c7f11d17142b488396e5e3c39a31520b36139
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1281223
milestone50.0a1
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