Bug 1254829 - Calling TerminateProcess for WindowsXP to bypass DLL detach handler, r?bsmedberg
MozReview-Commit-ID: 41fuZobVVyv
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -2312,17 +2312,25 @@ ContentChild::ProcessingError(Result aCo
#endif
NS_RUNTIMEABORT("Content child abort due to IPC error");
}
void
ContentChild::QuickExit()
{
NS_WARNING("content process _exit()ing");
+
+#ifdef XP_WIN
+ // In bug 1254829, the destructor got called when dll got detached on windows,
+ // switch to TerminateProcess to bypass dll detach handler during the process
+ // termination.
+ TerminateProcess(GetCurrentProcess(), 0);
+#else
_exit(0);
+#endif
}
nsresult
ContentChild::AddRemoteAlertObserver(const nsString& aData,
nsIObserver* aObserver)
{
NS_ASSERTION(aObserver, "Adding a null observer?");
mAlertObservers.AppendElement(new AlertObserver(aObserver, aData));