Back out 20b67f48676c (bug 778355) because of potential deadlock detected in make check
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 30 Jul 2012 11:56:48 -0700
changeset 100895 72966f49cf09802b43292a3643cbf44cc91fbd3a
parent 100894 a169ee0246ee170f4ef72a12d66951b0d5830882
child 100896 7ac323ff812e2ff8fd7b35cc1c001cb781424c80
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs778355
milestone17.0a1
backs out20b67f48676c6afd5353b5ca621e2980e43a1abe
Back out 20b67f48676c (bug 778355) because of potential deadlock detected in make check
xpfe/appshell/src/nsWebShellWindow.cpp
--- a/xpfe/appshell/src/nsWebShellWindow.cpp
+++ b/xpfe/appshell/src/nsWebShellWindow.cpp
@@ -87,16 +87,22 @@ nsWebShellWindow::nsWebShellWindow(PRUin
   : nsXULWindow(aChromeFlags)
   , mSPTimerLock("nsWebShellWindow.mSPTimerLock")
 {
 }
 
 
 nsWebShellWindow::~nsWebShellWindow()
 {
+  if (mWindow) {
+    mWindow->SetClientData(0);
+    mWindow->Destroy();
+    mWindow = nullptr; // Force release here.
+  }
+
   MutexAutoLock lock(mSPTimerLock);
   if (mSPTimer)
     mSPTimer->Cancel();
 }
 
 NS_IMPL_ADDREF_INHERITED(nsWebShellWindow, nsXULWindow)
 NS_IMPL_RELEASE_INHERITED(nsWebShellWindow, nsXULWindow)