[GTK] Do not look for child processes in the UI process binary path
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Mar 2015 17:47:38 +0000 (17:47 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Mar 2015 17:47:38 +0000 (17:47 +0000)
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.

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

ChangeLog
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
Source/cmake/OptionsGTK.cmake

index 3c4916f..b27fe7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-03-11  Carlos Garcia Campos  <cgarcia@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  <cgarcia@igalia.com> and José Dapena Paz  <jdapena@igalia.com>
 
         [GTK] Add a configure option to build with OpenGL ES 2
index 5a85fd1..00d4043 100644 (file)
@@ -1,3 +1,21 @@
+2015-03-11  Carlos Garcia Campos  <cgarcia@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  <antti@apple.com>
 
         Add interface to delete disk cache entries
index 5b5b947..81bac45 100644 (file)
 
 #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 @@ static String getExecutablePath()
         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 @@ static String findWebKitProcess(const char* processName)
         if (fileExists(processPath))
             return processPath;
     }
+#endif
 
     return pathByAppendingComponent(filenameToString(LIBEXECDIR), processName);
 }
index 60ab31c..9f3c6cc 100644 (file)
@@ -218,9 +218,11 @@ static inline WebKitProcessModel toWebKitProcessModel(WebKit::ProcessModel proce
 
 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;
index 7172c73..86f42ba 100644 (file)
@@ -248,6 +248,10 @@ add_definitions(-DUSER_AGENT_GTK_MAJOR_VERSION=601)
 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)