Bug 1281223 - Debug instrumentation for catching accidental destruction of the ContentChild instance. r=billm
authorCervantes Yu <cyu@mozilla.com>
Fri, 29 Jul 2016 15:13:10 +0800
changeset 347290 e7e76c9521024792f6d9b430913bdaff3cb11254
parent 347289 a467d989a3b9e1809f42985cdd23bc4ea93db9ad
child 347291 64fa2d708a10b158a57599016bf9f4a8f92b3024
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 catching 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
+  NS_RUNTIMEABORT("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