Bug 1158761 - Part 1: Make CheckPluginStopEvent run asynchronously. r=bholley, a=sledru
authorAaron Klotz <aklotz@mozilla.com>
Thu, 30 Apr 2015 14:54:09 -0600
changeset 260536 c163f5453215
parent 260535 fe2c942655ec
child 260537 aa884d29e93c
push id811
push userryanvm@gmail.com
push date2015-05-20 14:59 +0000
treeherdermozilla-release@aa884d29e93c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley, sledru
bugs1158761
milestone38.0.5
Bug 1158761 - Part 1: Make CheckPluginStopEvent run asynchronously. r=bholley, a=sledru
dom/base/nsObjectLoadingContent.cpp
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -587,20 +587,17 @@ PluginExistsForType(const char* aMIMETyp
 
 // Helper to queue a CheckPluginStopEvent for a OBJLC object
 void
 nsObjectLoadingContent::QueueCheckPluginStopEvent()
 {
   nsCOMPtr<nsIRunnable> event = new CheckPluginStopEvent(this);
   mPendingCheckPluginStopEvent = event;
 
-  nsCOMPtr<nsIAppShell> appShell = do_GetService(kAppShellCID);
-  if (appShell) {
-    appShell->RunInStableState(event);
-  }
+  NS_DispatchToCurrentThread(event);
 }
 
 // Tedious syntax to create a plugin stream listener with checks and put it in
 // mFinalListener
 bool
 nsObjectLoadingContent::MakePluginListener()
 {
   if (!mInstanceOwner) {