Title: [106701] trunk/Source/WebKit2
Revision
106701
Author
[email protected]
Date
2012-02-03 15:47:55 -0800 (Fri, 03 Feb 2012)

Log Message

[Mac WK2] Use a minimally invasive way to fake plug-in process name
https://bugs.webkit.org/show_bug.cgi?id=77682

Reviewed by Darin Adler.

* PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::netscapePluginModule):
Only change the name as it's seen from within the process.

* Shared/Plugins/PluginQuirks.h: Fixed a typo.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (106700 => 106701)


--- trunk/Source/WebKit2/ChangeLog	2012-02-03 23:18:56 UTC (rev 106700)
+++ trunk/Source/WebKit2/ChangeLog	2012-02-03 23:47:55 UTC (rev 106701)
@@ -1,3 +1,15 @@
+2012-02-03  Alexey Proskuryakov  <[email protected]>
+
+        [Mac WK2] Use a minimally invasive way to fake plug-in process name
+        https://bugs.webkit.org/show_bug.cgi?id=77682
+
+        Reviewed by Darin Adler.
+
+        * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::netscapePluginModule):
+        Only change the name as it's seen from within the process.
+
+        * Shared/Plugins/PluginQuirks.h: Fixed a typo.
+
 2012-02-03  Beth Dakin  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=77691

Modified: trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp (106700 => 106701)


--- trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp	2012-02-03 23:18:56 UTC (rev 106700)
+++ trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp	2012-02-03 23:47:55 UTC (rev 106701)
@@ -38,6 +38,10 @@
 #include <WebCore/NotImplemented.h>
 #include <WebCore/RunLoop.h>
 
+#if PLATFORM(MAC)
+#include <crt_externs.h>
+#endif
+
 #if USE(UNIX_DOMAIN_SOCKETS)
 #include <errno.h>
 #include <fcntl.h>
@@ -115,7 +119,7 @@
 #if PLATFORM(MAC)
         if (m_pluginModule) {
             if (m_pluginModule->pluginQuirks().contains(PluginQuirks::PrognameShouldBeWebKitPluginHost))
-                setprogname("WebKitPluginHost");
+                *const_cast<const char**>(_NSGetProgname()) = "WebKitPluginHost";
         }
 #endif
     }

Modified: trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h (106700 => 106701)


--- trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h	2012-02-03 23:18:56 UTC (rev 106700)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h	2012-02-03 23:47:55 UTC (rev 106701)
@@ -33,7 +33,7 @@
     enum PluginQuirk {
         // Mac specific quirks:
 #if PLUGIN_ARCHITECTURE(MAC)
-        // The plug-in wants the call to getprogame() to return "WebKitPluginHost".
+        // The plug-in wants the call to getprogname() to return "WebKitPluginHost".
         // Adobe Flash Will not handle key down events otherwise.
         PrognameShouldBeWebKitPluginHost,
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to