Title: [114307] trunk/Source/WebKit/mac
- Revision
- 114307
- Author
- ander...@apple.com
- Date
- 2012-04-16 15:19:50 -0700 (Mon, 16 Apr 2012)
Log Message
Use a MIG call when creating a plug-in property list file
https://bugs.webkit.org/show_bug.cgi?id=84084
<rdar://problem/11197341>
Reviewed by Sam Weinig.
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::createPropertyListFile):
Get a plug-in host and call _WKPHCreatePluginMIMETypesPreferences instead.
* Plugins/Hosted/WebKitPluginHost.defs:
Add PHCreatePluginMIMETypesPreferences.
* Plugins/WebNetscapePluginPackage.mm:
(-[WebNetscapePluginPackage createPropertyListFile]):
NetscapePluginHostManager::createPropertyListFile is no longer a static member function.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (114306 => 114307)
--- trunk/Source/WebKit/mac/ChangeLog 2012-04-16 22:14:02 UTC (rev 114306)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-04-16 22:19:50 UTC (rev 114307)
@@ -1,3 +1,22 @@
+2012-04-16 Anders Carlsson <ander...@apple.com>
+
+ Use a MIG call when creating a plug-in property list file
+ https://bugs.webkit.org/show_bug.cgi?id=84084
+ <rdar://problem/11197341>
+
+ Reviewed by Sam Weinig.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::createPropertyListFile):
+ Get a plug-in host and call _WKPHCreatePluginMIMETypesPreferences instead.
+
+ * Plugins/Hosted/WebKitPluginHost.defs:
+ Add PHCreatePluginMIMETypesPreferences.
+
+ * Plugins/WebNetscapePluginPackage.mm:
+ (-[WebNetscapePluginPackage createPropertyListFile]):
+ NetscapePluginHostManager::createPropertyListFile is no longer a static member function.
+
2012-04-12 Andy Estes <aes...@apple.com>
REGRESSION (r102262): iAd Producer relies on CSSStyleDeclaration property setters respecting '!important'
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h (114306 => 114307)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h 2012-04-16 22:14:02 UTC (rev 114306)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h 2012-04-16 22:19:50 UTC (rev 114307)
@@ -48,7 +48,7 @@
void pluginHostDied(NetscapePluginHostProxy*);
- static void createPropertyListFile(const WTF::String& pluginPath, cpu_type_t pluginArchitecture);
+ void createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier);
void didCreateWindow();
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm (114306 => 114307)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2012-04-16 22:14:02 UTC (rev 114306)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2012-04-16 22:19:50 UTC (rev 114307)
@@ -272,31 +272,13 @@
return instance.release();
}
-void NetscapePluginHostManager::createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture)
-{
- NSString *pluginHostAppPath = [[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] pathForAuxiliaryExecutable:pluginHostAppName];
- NSString *pluginHostAppExecutablePath = [[NSBundle bundleWithPath:pluginHostAppPath] executablePath];
- NSString *bundlePath = pluginPath;
+void NetscapePluginHostManager::createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier)
+{
+ NetscapePluginHostProxy* hostProxy = hostForPlugin(pluginPath, pluginArchitecture, bundleIdentifier);
+ if (!hostProxy)
+ return;
- pid_t pid;
- posix_spawnattr_t attr;
- posix_spawnattr_init(&attr);
-
- // Set the architecture.
- size_t ocount = 0;
- int cpuTypes[] = { pluginArchitecture };
- posix_spawnattr_setbinpref_np(&attr, 1, cpuTypes, &ocount);
-
- // Spawn the plug-in host and tell it to call the registration function.
- const char* args[] = { [pluginHostAppExecutablePath fileSystemRepresentation], "-createPluginMIMETypesPreferences", [bundlePath fileSystemRepresentation], 0 };
-
- int result = posix_spawn(&pid, args[0], 0, &attr, const_cast<char* const*>(args), 0);
- posix_spawnattr_destroy(&attr);
-
- if (!result && pid > 0) {
- // Wait for the process to finish.
- while (waitpid(pid, 0, 0) == -1) { }
- }
+ _WKPHCreatePluginMIMETypesPreferences(hostProxy->port());
}
void NetscapePluginHostManager::didCreateWindow()
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs (114306 => 114307)
--- trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs 2012-04-16 22:14:02 UTC (rev 114306)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs 2012-04-16 22:19:50 UTC (rev 114307)
@@ -246,3 +246,5 @@
requestID :uint32_t;
width :uint32_t;
height :uint32_t);
+
+routine PHCreatePluginMIMETypesPreferences(pluginHostPort :mach_port_t);
Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm (114306 => 114307)
--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm 2012-04-16 22:14:02 UTC (rev 114306)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginPackage.mm 2012-04-16 22:19:50 UTC (rev 114307)
@@ -321,7 +321,7 @@
- (void)createPropertyListFile
{
- NetscapePluginHostManager::createPropertyListFile(path, pluginHostArchitecture);
+ NetscapePluginHostManager::shared().createPropertyListFile(path, pluginHostArchitecture, [self bundleIdentifier]);
}
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes