Bug 719117 - Backout bug 724781. part 1/3, r=roc a=akeybl
authorMats Palmgren <matspal@gmail.com>
Mon, 28 May 2012 21:56:02 +0200
changeset 95879 e8dd14a636a193138cb6b8bdc955ebe9f6f20a0a
parent 95878 3a0cedb8ececd5ceee4bbc867bbbc0547c9e5f39
child 95880 3a2ab408f2e2507e565e8fcfaa1ee0ae63983c39
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, akeybl
bugs719117, 724781
milestone14.0a2
Bug 719117 - Backout bug 724781. part 1/3, r=roc a=akeybl
content/base/src/nsObjectLoadingContent.cpp
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -2222,23 +2222,20 @@ nsObjectLoadingContent::StopPluginInstan
     if (NS_SUCCEEDED(inst->GetMIMEType(&mime)) && mime) {
       if (strcmp(mime, "audio/x-pn-realaudio-plugin") == 0) {
         delayedStop = true;
       }      
     }
   }
 #endif
 
-  // DoStopPlugin can process events and there may be pending InDocCheckEvent
-  // events which can drop in underneath us and destroy the instance we are
-  // about to destroy. Make sure this doesn't happen via this temp ref ptr and
-  // the !mInstanceOwner check above.
-  nsRefPtr<nsPluginInstanceOwner> instOwner = mInstanceOwner;
+  DoStopPlugin(mInstanceOwner, delayedStop);
+
   mInstanceOwner = nsnull;
-  DoStopPlugin(instOwner, delayedStop);
+
   return NS_OK;
 }
 
 void
 nsObjectLoadingContent::NotifyContentObjectWrapper()
 {
   nsCOMPtr<nsIContent> thisContent = do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));