Bug 1117864: Do not pass a runnable to PluginProcessParent::Launch when initializing plugins synchronously; r=jimm
☠☠ backed out by 8fa274cce616 ☠ ☠
authorAaron Klotz <aklotz@mozilla.com>
Wed, 07 Jan 2015 12:39:37 -0700
changeset 248407 852f51cb251ee202be624588e4045a4de98bcef3
parent 248406 5e04df19d58130e890eeb47e52e26eddebead1a9
child 248408 944289439ce9b4fefc1f17034566c6f76b147d80
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1117864
milestone37.0a1
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 1117864: Do not pass a runnable to PluginProcessParent::Launch when initializing plugins synchronously; r=jimm
dom/plugins/ipc/PluginModuleParent.cpp
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -363,20 +363,22 @@ PluginModuleChromeParent::SendAssociateP
 // static
 PluginLibrary*
 PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId,
                                      nsPluginTag* aPluginTag)
 {
     PLUGIN_LOG_DEBUG_FUNCTION;
 
     nsAutoPtr<PluginModuleChromeParent> parent(new PluginModuleChromeParent(aFilePath, aPluginId));
-    UniquePtr<LaunchCompleteTask> onLaunchedRunnable(new LaunchedTask(parent));
-    parent->mSubprocess->SetCallRunnableImmediately(!parent->mIsStartingAsync);
+    UniquePtr<LaunchCompleteTask> launchRunnable;
+    if (parent->mIsStartingAsync) {
+        launchRunnable.reset(new LaunchedTask(parent));
+    }
     TimeStamp launchStart = TimeStamp::Now();
-    bool launched = parent->mSubprocess->Launch(Move(onLaunchedRunnable));
+    bool launched = parent->mSubprocess->Launch(Move(launchRunnable));
     if (!launched) {
         // We never reached open
         parent->mShutdown = true;
         return nullptr;
     }
     if (!parent->mIsStartingAsync) {
         int32_t launchTimeoutSecs = Preferences::GetInt(kLaunchTimeoutPref, 0);
         if (!parent->mSubprocess->WaitUntilConnected(launchTimeoutSecs * 1000)) {