Bug 675309: Get rid of unnecessary calls to nsNPAPIPluginInstance::Start(). r=jst
authorJosh Aas <joshmoz@gmail.com>
Tue, 02 Aug 2011 13:49:05 -0400
changeset 73679 f21f3fafab5b5224defa1b7e907b63be2135e1d7
parent 73678 b1013d7d7cd8977db811b7f3a0ef374ca3c094fc
child 73688 aca5afbed1883d081218aeb1d99c6f6ef5cfa2ba
push id20904
push userjosh@mozilla.com
push dateTue, 02 Aug 2011 17:49:55 +0000
treeherdermozilla-central@f21f3fafab5b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs675309
milestone8.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 675309: Get rid of unnecessary calls to nsNPAPIPluginInstance::Start(). r=jst
dom/plugins/base/nsPluginHost.cpp
dom/plugins/base/nsPluginStreamListenerPeer.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -1062,17 +1062,16 @@ nsPluginHost::InstantiateEmbeddedPlugin(
   nsRefPtr<nsNPAPIPluginInstance> instance;
   rv = aOwner->GetInstance(getter_AddRefs(instance));
   // if we have a failure error, it means we found a plugin for the mimetype,
   // but we had a problem with the entry point
   if (rv == NS_ERROR_FAILURE)
     return rv;
 
   if (instance) {
-    instance->Start();
     aOwner->CreateWidget();
 
     // If we've got a native window, the let the plugin know about it.
     aOwner->SetWindow();
 
     // create an initial stream with data
     // don't make the stream if it's a java applet or we don't have SRC or DATA attribute
     PRBool havedata = PR_FALSE;
@@ -1121,17 +1120,16 @@ nsresult nsPluginHost::InstantiateFullPa
   if (NS_OK == rv) {
     nsRefPtr<nsNPAPIPluginInstance> instance;
     aOwner->GetInstance(getter_AddRefs(instance));
 
     NPWindow* win = nsnull;
     aOwner->GetWindow(win);
 
     if (win && instance) {
-      instance->Start();
       aOwner->CreateWidget();
 
       // If we've got a native window, the let the plugin know about it.
       aOwner->SetWindow();
 
       rv = NewFullPagePluginStream(aURI, instance.get(), aStreamListener);
 
       // If we've got a native window, the let the plugin know about it.
--- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
@@ -653,17 +653,16 @@ nsPluginStreamListenerPeer::OnStartReque
     mOwner->GetWindow(window);
     if (!mPluginInstance && window) {
       nsRefPtr<nsPluginHost> pluginHost = dont_AddRef(nsPluginHost::GetInst());
       rv = pluginHost->SetUpPluginInstance(aContentType.get(), aURL, mOwner);
       if (NS_SUCCEEDED(rv)) {
         mOwner->GetInstance(getter_AddRefs(pluginInstRefPtr));
         mPluginInstance = pluginInstRefPtr.get();
         if (mPluginInstance) {
-          mPluginInstance->Start();
           mOwner->CreateWidget();
           // If we've got a native window, the let the plugin know about it.
           mOwner->SetWindow();
         }
       }
     }
   }