[EFL] Make plugin process debugging easier (PLUGIN_PROCESS_COMMAND_PREFIX)
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Oct 2012 12:33:04 +0000 (12:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Oct 2012 12:33:04 +0000 (12:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=99297

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-10-23
Reviewed by Kenneth Rohde Christiansen.

Add support for PLUGIN_PROCESS_COMMAND_PREFIX environment variable, to allow easier
plugin debugging with e.g.:
$ PLUGIN_PROCESS_COMMAND_PREFIX="xterm gdb --args" MiniBrowser

* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
(WebKit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132209 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp

index d319922..ff60939 100644 (file)
@@ -1,3 +1,18 @@
+2012-10-23  Jussi Kukkonen  <jussi.kukkonen@intel.com>
+
+        [EFL] Make plugin process debugging easier (PLUGIN_PROCESS_COMMAND_PREFIX)
+        https://bugs.webkit.org/show_bug.cgi?id=99297
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add support for PLUGIN_PROCESS_COMMAND_PREFIX environment variable, to allow easier
+        plugin debugging with e.g.:
+        $ PLUGIN_PROCESS_COMMAND_PREFIX="xterm gdb --args" MiniBrowser
+
+        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
+        (WebKit::PluginProcessProxy::platformInitializeLaunchOptions):
+        (WebKit):
+
 2012-10-23  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
 
         [EFL][WK2] Make Policy client a C++ class
index 64c7bc4..189e213 100644 (file)
@@ -43,8 +43,15 @@ using namespace WebCore;
 
 namespace WebKit {
 
-void PluginProcessProxy::platformInitializeLaunchOptions(ProcessLauncher::LaunchOptions&, const PluginModuleInfo&)
+void PluginProcessProxy::platformInitializeLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions, const PluginModuleInfo&)
 {
+#if PLATFORM(EFL) && !defined(NDEBUG)
+    const char* commandPrefix = getenv("PLUGIN_PROCESS_COMMAND_PREFIX");
+    if (commandPrefix && *commandPrefix)
+        launchOptions.processCmdPrefix = String::fromUTF8(commandPrefix);
+#else
+    UNUSED_PARAM(launchOptions);
+#endif
 }
 
 void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationParameters&)