Commit 8c7073db authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2009-03-18 Anders Carlsson <andersca@apple.com>

        Reviewed by Oliver Hunt.

        WebKit side of <rdar://problem/6688244>.
        
        Try reinitializing the vendor port if it's invalid.
        
        * Plugins/Hosted/NetscapePluginHostManager.mm:
        (WebKit::NetscapePluginHostManager::spawnPluginHost):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6f333c90
2009-03-18 Anders Carlsson <andersca@apple.com>
Reviewed by Oliver Hunt.
WebKit side of <rdar://problem/6688244>.
Try reinitializing the vendor port if it's invalid.
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost):
2009-03-18 Anders Carlsson <andersca@apple.com>
 
Reviewed by Darin Adler.
......
......@@ -118,6 +118,16 @@ bool NetscapePluginHostManager::spawnPluginHost(WebNetscapePluginPackage *packag
kern_return_t kr = _WKPASpawnPluginHost(m_pluginVendorPort, reinterpret_cast<uint8_t*>(const_cast<void*>([data bytes])), [data length], &pluginHostPort);
if (kr == MACH_SEND_INVALID_DEST) {
// The plug-in vendor port has gone away for some reason. Try to reinitialize it.
m_pluginVendorPort = MACH_PORT_NULL;
if (!initializeVendorPort())
return false;
// And spawn the plug-in host again.
kr = _WKPASpawnPluginHost(m_pluginVendorPort, reinterpret_cast<uint8_t*>(const_cast<void*>([data bytes])), [data length], &pluginHostPort);
}
if (kr != KERN_SUCCESS) {
// FIXME: Check for invalid dest and try to re-spawn the plug-in agent.
LOG_ERROR("Failed to spawn plug-in host, error %x", kr);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment