diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index 801f51a664a5..daf7df57a6a2 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -368,12 +368,10 @@ PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId, PLUGIN_LOG_DEBUG_FUNCTION; nsAutoPtr parent(new PluginModuleChromeParent(aFilePath, aPluginId)); - UniquePtr launchRunnable; - if (parent->mIsStartingAsync) { - launchRunnable.reset(new LaunchedTask(parent)); - } + UniquePtr onLaunchedRunnable(new LaunchedTask(parent)); + parent->mSubprocess->SetCallRunnableImmediately(!parent->mIsStartingAsync); TimeStamp launchStart = TimeStamp::Now(); - bool launched = parent->mSubprocess->Launch(Move(launchRunnable)); + bool launched = parent->mSubprocess->Launch(Move(onLaunchedRunnable)); if (!launched) { // We never reached open parent->mShutdown = true;