Bug 613376 - r=josh a=blocking2.0beta8+
authorSteven Michaud <smichaud@pobox.com>
Tue, 23 Nov 2010 14:45:40 -0600
changeset 58093 43a10e7fbef398cd9d629e7cb094f01a5eb175ab
parent 58092 4973e2b9a905c183a573097f0bf369d7fbb8e50a
child 58094 1d4e3afd67e718a036aa7ef9cb99a95284de16c8
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersjosh, blocking2
bugs613376
milestone2.0b8pre
Bug 613376 - r=josh a=blocking2.0beta8+
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -473,16 +473,22 @@ nsDummyJavaPluginOwner::Destroy()
   }
 
   mDocument = nsnull;
 }
 
 NS_IMETHODIMP
 nsDummyJavaPluginOwner::SetInstance(nsIPluginInstance *aInstance)
 {
+  // If we're going to null out mInstance after use, be sure to call
+  // mInstance->InvalidateOwner() here, since it now won't be called
+  // from nsDummyJavaPluginOwner::Destroy().
+  if (mInstance && !aInstance)
+    mInstance->InvalidateOwner();
+
   mInstance = aInstance;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDummyJavaPluginOwner::GetInstance(nsIPluginInstance *&aInstance)
 {