1. 18 Mar, 2009 1 commit
  2. 11 Mar, 2009 1 commit
    • andersca@apple.com's avatar
      2009-03-11 Anders Carlsson <andersca@apple.com> · a8012391
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              WebKit side of <rdar://problem/6656147>.
              
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              Pass the requestID to _WKPHInstantiatePlugin.
              
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              Pass the requestID to setCurrentReply.
              
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
              Store the reply in a map with the requestID as the key.
              
              (WebKit::NetscapePluginInstanceProxy::waitForReply):
              Wait for a reply that matches the given requestID.
              
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
              Initialize member variables.
              
              (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
              Delete all requests.
              
              (WebKit::NetscapePluginInstanceProxy::print):
              Pass the requestID to _WKPHPluginInstancePrint.
              
              (WebKit::NetscapePluginInstanceProxy::loadRequest):
              Rename m_currentRequestID to m_currentURLRequestID.
              
              (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
              Process requests until we find a reply with the right requestID.
              
              (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
              Pass a requestID to the _WKPH function.
              
              (WebKit::NetscapePluginInstanceProxy::nextRequestID):
              Ditto.
              
              * Plugins/Hosted/ProxyInstance.mm:
              Pass a requestID to the _WKPH functions.
              
              * Plugins/Hosted/WebKitPluginClient.defs:
              * Plugins/Hosted/WebKitPluginHost.defs:
              Add requestID parameters.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a8012391
  3. 03 Mar, 2009 1 commit
  4. 02 Mar, 2009 1 commit
    • andersca@apple.com's avatar
      2009-03-02 Anders Carlsson <andersca@apple.com> · 9a593453
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              WebKit part of <rdar://problem/6638658>.
              
              * Plugins/Hosted/NetscapePluginHostManager.h:
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::createPropertyListFile):
              Spawn the plug-in host and wait for it to create the property list.
              
              * Plugins/WebBasePluginPackage.mm:
              (-[WebBasePluginPackage createPropertyListFile]):
              Factor code out into a new method.
              
              (-[WebBasePluginPackage pListForPath:createFile:]):
              Call the newly added createPropertyListFile method.
              
              * Plugins/WebNetscapePluginPackage.mm:
              (-[WebNetscapePluginPackage createPropertyListFile]):
              Tell the plug-in host manager to create a property list file for us.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9a593453
  5. 01 Mar, 2009 1 commit
  6. 10 Feb, 2009 1 commit
    • andersca@apple.com's avatar
      2009-02-10 Anders Carlsson <andersca@apple.com> · 19b3ca1c
      andersca@apple.com authored
              Reviewed by Mark Rowe.
      
              <rdar://problem/6573916> 
              CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
              
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              If we failed to instantiate the plug-in, invalidate the instance proxy.
              
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::invalidate):
              Remove the instance from the plug-in host's set.
              
              (WebKit::NetscapePluginInstanceProxy::destroy):
              Call invalidate().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19b3ca1c
  7. 29 Jan, 2009 1 commit
    • andersca@apple.com's avatar
      2009-01-29 Anders Carlsson <andersca@apple.com> · 0e9fb80d
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
              
              * Plugins/Hosted/NetscapePluginHostManager.h:
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::hostForPackage):
              Get the current PSN and pass it to spawnPluginHost.
              
              (WebKit::NetscapePluginHostManager::spawnPluginHost):
              Pass the PSN to the "check in" function.
              
              * Plugins/Hosted/NetscapePluginHostProxy.h:
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
              
              (WebKit::NetscapePluginHostProxy::pluginHostDied):
              Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
              
              (WebKit::NetscapePluginHostProxy::beginModal):
              (WebKit::NetscapePluginHostProxy::endModal):
              (WebKit::NetscapePluginHostProxy::setModal):
              Split out the code that does all of the work into beginModal and endModal methods.
              
              * Plugins/Hosted/WebKitPluginHost.defs:
              * Plugins/WebNetscapePluginView.mm:
              (-[WebNetscapePluginView loadStream]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e9fb80d
  8. 22 Jan, 2009 1 commit
    • andersca@apple.com's avatar
      2009-01-22 Anders Carlsson <andersca@apple.com> · 978fe76a
      andersca@apple.com authored
              Reviewed by Kevin Decker.
      
              Don't crash or hang when we fail to instantiate a plug-in.
              
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              Return 0 on failure.
              
              * Plugins/Hosted/WebHostedNetscapePluginView.mm:
              (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
              Null check for the proxy member.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      978fe76a
  9. 15 Dec, 2008 2 commits
    • andersca@apple.com's avatar
      2008-12-15 Anders Carlsson <andersca@apple.com> · 4d01561d
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
              back into us while it's being instantiated.
              
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              * Plugins/Hosted/NetscapePluginHostProxy.h:
              (WebKit::NetscapePluginHostProxy::clientPort):
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              (WKPCInstantiatePluginReply):
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              (WebKit::NetscapePluginInstanceProxy::Reply::):
              (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
              (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
              (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
              (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
              (WebKit::NetscapePluginInstanceProxy::waitForReply):
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
              (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
              * Plugins/Hosted/WebKitPluginClient.defs:
              * Plugins/Hosted/WebKitPluginHost.defs:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d01561d
    • andersca@apple.com's avatar
      2008-12-15 Anders Carlsson <andersca@apple.com> · 58fbb19e
      andersca@apple.com authored
              Reviewed by Darin Adler.
      
              Let WebKit generate a plug-in ID instead of having the plug-in host do it.
      
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              Create the plug-in proxy before instantiating the plug-in.
              
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              (WebKit::NetscapePluginInstanceProxy::create):
              (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
              (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
              * Plugins/Hosted/WebKitPluginHost.defs:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58fbb19e
  10. 03 Dec, 2008 1 commit
  11. 02 Dec, 2008 3 commits
    • andersca@apple.com's avatar
      2008-12-02 Anders Carlsson <andersca@apple.com> · 7346abe9
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Create a client mach port and pass it to the plug-in host.
              
              * Plugins/Hosted/NetscapePluginHostManager.h:
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::hostForPackage):
              (WebKit::NetscapePluginHostManager::spawnPluginHost):
              * Plugins/Hosted/NetscapePluginHostProxy.h:
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
              * Plugins/Hosted/WebKitPluginHost.defs:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7346abe9
    • andersca@apple.com's avatar
      2008-12-02 Anders Carlsson <andersca@apple.com> · cdf0ef30
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Let the plug-in views know if the plug-in host crashes.
              
              * Plugins/Hosted/NetscapePluginHostManager.h:
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              * Plugins/Hosted/NetscapePluginHostProxy.h:
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              (WebKit::NetscapePluginHostProxy::pluginHostDied):
              (WebKit::NetscapePluginHostProxy::addPluginInstance):
              (WebKit::NetscapePluginHostProxy::removePluginInstance):
              
              * Plugins/Hosted/NetscapePluginInstanceProxy.h:
              (WebKit::NetscapePluginInstanceProxy::create):
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              Keep a pointer to the host proxy.
              
              (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
              Add the instance to the host set.
              
              (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
              Remove the instance form the host set.
              
              (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
              Tell the plug-in view that the plug-in died.
      
              * Plugins/Hosted/WebHostedNetscapePluginView.h:
              * Plugins/Hosted/WebHostedNetscapePluginView.mm:
              (-[WebHostedNetscapePluginView createPlugin]):
              Pass the plug-in view to the instantiatePlugin.
              
              (-[WebHostedNetscapePluginView pluginHostDied]):
              Handle the plug-in host crashing.
              
              (-[WebHostedNetscapePluginView drawRect:]):
              Fill the plug-in view with a nice red shade if the plug-in crashes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cdf0ef30
    • andersca@apple.com's avatar
      2008-12-01 Anders Carlsson <andersca@apple.com> · a853c263
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
              
              * Plugins/Hosted/NetscapePluginHostManager.h:
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::pluginHostDied):
              Remove the plug-in host from the map.
              
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              NetscapePluginHostProxy is no longer refcounted.
      
              * Plugins/Hosted/NetscapePluginHostProxy.h:
              This is no longer refcounted. Add a set of plug-in instances (unused for now).
              
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
              Create a death notification port.
              
              (WebKit::NetscapePluginHostProxy::pluginHostDied):
              Tell the manager that we're gone and delete ourselves.
              
              (WebKit::NetscapePluginHostProxy::deathPortCallback):
              New CFMachPort callback.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a853c263
  12. 01 Dec, 2008 1 commit
    • andersca@apple.com's avatar
      2008-12-01 Anders Carlsson <andersca@apple.com> · 881e96d0
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Move instantiatePlugin to NetscapePluginHostManager.
              
              * Plugins/Hosted/NetscapePluginHostManager.h:
              * Plugins/Hosted/NetscapePluginHostManager.mm:
              (WebKit::NetscapePluginHostManager::instantiatePlugin):
              * Plugins/Hosted/NetscapePluginHostProxy.h:
              * Plugins/Hosted/NetscapePluginHostProxy.mm:
              * Plugins/Hosted/WebHostedNetscapePluginView.mm:
              (-[WebHostedNetscapePluginView createPlugin]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      881e96d0
  13. 26 Nov, 2008 1 commit
    • andersca@apple.com's avatar
      2008-11-26 Anders Carlsson <andersca@apple.com> · 04c63b72
      andersca@apple.com authored
              Reviewed by Dan Bernstein, Mark Rowe and Kevin Decker.
      
              Add the plug-in host manager singleton.
              
              * Plugins/Hosted/NetscapePluginHostManager.h: Added.
              * Plugins/Hosted/NetscapePluginHostManager.mm: Added.
              
              (WebKit::NetscapePluginHostManager::hostForPackage):
              If there's an existing host proxy available, just return it. Otherwise spawn a new plug-in host and
              create a new plug-in host proxy from the new plug-in host port.
              
              (WebKit::NetscapePluginHostManager::spawnPluginHost):
              Pass the plug-in host path and the preferred CPU type to the plug-in agent. When the plug-in host has
              finished launching, pass it the path to the plug-in bundle.
              
              (WebKit::NetscapePluginHostManager::initializeVendorPort):
              Check in with the plug-in agent and get the new plug-in vendor port back.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04c63b72