Title: [181392] trunk
Revision
181392
Author
carlo...@webkit.org
Date
2015-03-11 10:47:38 -0700 (Wed, 11 Mar 2015)

Log Message

[GTK] Do not look for child processes in the UI process binary path
https://bugs.webkit.org/show_bug.cgi?id=135752

Reviewed by Gustavo Noronha Silva.

.:

* Source/cmake/OptionsGTK.cmake: Add -DDEVELOPMENT_BUILD=1 to the
build for development builds.

Source/WebKit2:

It's only useful for internal tools and tests, but never when
installed, since we don't install the processes in the bin dir but
in the libexec dir.

* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess): Only look or the executables in the
UI process binary path or WEBKIT_EXEC_PATH for development builds.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory): Only check
WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.

Modified Paths

Diff

Modified: trunk/ChangeLog (181391 => 181392)


--- trunk/ChangeLog	2015-03-11 16:38:30 UTC (rev 181391)
+++ trunk/ChangeLog	2015-03-11 17:47:38 UTC (rev 181392)
@@ -1,3 +1,13 @@
+2015-03-11  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Do not look for child processes in the UI process binary path
+        https://bugs.webkit.org/show_bug.cgi?id=135752
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * Source/cmake/OptionsGTK.cmake: Add -DDEVELOPMENT_BUILD=1 to the
+        build for development builds.
+
 2015-03-10  Carlos Garcia Campos  <cgar...@igalia.com> and José Dapena Paz  <jdap...@igalia.com>
 
         [GTK] Add a configure option to build with OpenGL ES 2

Modified: trunk/Source/WebKit2/ChangeLog (181391 => 181392)


--- trunk/Source/WebKit2/ChangeLog	2015-03-11 16:38:30 UTC (rev 181391)
+++ trunk/Source/WebKit2/ChangeLog	2015-03-11 17:47:38 UTC (rev 181392)
@@ -1,3 +1,21 @@
+2015-03-11  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Do not look for child processes in the UI process binary path
+        https://bugs.webkit.org/show_bug.cgi?id=135752
+
+        Reviewed by Gustavo Noronha Silva.
+
+        It's only useful for internal tools and tests, but never when
+        installed, since we don't install the processes in the bin dir but
+        in the libexec dir.
+
+        * Shared/gtk/ProcessExecutablePathGtk.cpp:
+        (WebKit::findWebKitProcess): Only look or the executables in the
+        UI process binary path or WEBKIT_EXEC_PATH for development builds.
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (injectedBundleDirectory): Only check
+        WEBKIT_INJECTED_BUNDLE_PATH env var for development builds.
+
 2015-03-10  Antti Koivisto  <an...@apple.com>
 
         Add interface to delete disk cache entries

Modified: trunk/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp (181391 => 181392)


--- trunk/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp	2015-03-11 16:38:30 UTC (rev 181391)
+++ trunk/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp	2015-03-11 17:47:38 UTC (rev 181392)
@@ -29,12 +29,16 @@
 
 #include <WebCore/FileSystem.h>
 #include <glib.h>
+
+#if defined(DEVELOPMENT_BUILD)
 #include <wtf/gobject/GlibUtilities.h>
+#endif
 
 using namespace WebCore;
 
 namespace WebKit {
 
+#if defined(DEVELOPMENT_BUILD)
 static String getExecutablePath()
 {
     CString executablePath = getCurrentExecutablePath();
@@ -42,9 +46,11 @@
         return directoryName(filenameToString(executablePath.data()));
     return String();
 }
+#endif
 
 static String findWebKitProcess(const char* processName)
 {
+#if defined(DEVELOPMENT_BUILD)
     static const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH");
     if (execDirectory) {
         String processPath = pathByAppendingComponent(filenameToString(execDirectory), processName);
@@ -58,6 +64,7 @@
         if (fileExists(processPath))
             return processPath;
     }
+#endif
 
     return pathByAppendingComponent(filenameToString(LIBEXECDIR), processName);
 }

Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (181391 => 181392)


--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp	2015-03-11 16:38:30 UTC (rev 181391)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp	2015-03-11 17:47:38 UTC (rev 181392)
@@ -218,9 +218,11 @@
 
 static const char* injectedBundleDirectory()
 {
+#if defined(DEVELOPMENT_BUILD)
     const char* bundleDirectory = g_getenv("WEBKIT_INJECTED_BUNDLE_PATH");
     if (bundleDirectory && g_file_test(bundleDirectory, G_FILE_TEST_IS_DIR))
         return bundleDirectory;
+#endif
 
     static const char* injectedBundlePath = LIBDIR G_DIR_SEPARATOR_S "webkit2gtk-" WEBKITGTK_API_VERSION_STRING
         G_DIR_SEPARATOR_S "injected-bundle" G_DIR_SEPARATOR_S;

Modified: trunk/Source/cmake/OptionsGTK.cmake (181391 => 181392)


--- trunk/Source/cmake/OptionsGTK.cmake	2015-03-11 16:38:30 UTC (rev 181391)
+++ trunk/Source/cmake/OptionsGTK.cmake	2015-03-11 17:47:38 UTC (rev 181392)
@@ -248,6 +248,10 @@
 add_definitions(-DUSER_AGENT_GTK_MINOR_VERSION=1)
 add_definitions(-DWEBKITGTK_API_VERSION_STRING="${WEBKITGTK_API_VERSION}")
 
+if (DEVELOPER_MODE)
+    add_definitions(-DDEVELOPMENT_BUILD=1)
+endif ()
+
 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
     set(GSTREAMER_COMPONENTS app pbutils)
     add_definitions(-DWTF_USE_GSTREAMER)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to