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 id17152
push usersmichaud@pobox.com
push dateTue, 23 Nov 2010 20:46:10 +0000
treeherdermozilla-central@43a10e7fbef3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh, blocking2.0beta8
bugs613376
milestone2.0b8pre
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 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)
 {