Changeset 233763 in webkit


Ignore:
Timestamp:
Jul 11, 2018 10:56:15 PM (6 years ago)
Author:
Carlos Garcia Campos
Message:

[WPE] Pass the backend library name as command line parameter to the web process
https://bugs.webkit.org/show_bug.cgi?id=186841

Reviewed by Žan Doberšek.

Source/WebKit:

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess): Add --backend-library parameter when launching the web process.

  • WebProcess/wpe/WebProcessMainWPE.cpp: Call wpe_loader_init() with the library passed as --backend-library parameter.

Tools:

  • MiniBrowser/wpe/main.cpp:

(main): Stop using WPE_BACKEND_LIBRARY env var.

  • Scripts/run-wpe-tests:

(WPETestRunner.init): Ditto.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server): Ditto.

  • wpe/backends/ViewBackend.cpp:

(WPEToolingBackends::ViewBackend::ViewBackend): Call wpe_loader_init() to ensure WPEBackend-fdo is used.

  • wpe/jhbuild.modules: Upgrade WPEBackend to version 0.2.0.
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r233756 r233763  
     12018-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [WPE] Pass the backend library name as command line parameter to the web process
     4        https://bugs.webkit.org/show_bug.cgi?id=186841
     5
     6        Reviewed by Žan Doberšek.
     7
     8        * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
     9        (WebKit::ProcessLauncher::launchProcess): Add --backend-library parameter when launching the web process.
     10        * WebProcess/wpe/WebProcessMainWPE.cpp: Call wpe_loader_init() with the library passed as --backend-library parameter.
     11
    1122018-07-11  Jon Lee  <jonlee@apple.com>
    213
  • trunk/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp

    r231042 r233763  
    100100#if PLATFORM(WPE)
    101101    GUniquePtr<gchar> wpeSocket;
     102    CString wpeBackendLibraryParameter;
    102103    if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web) {
     104#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0)
     105        wpeBackendLibraryParameter = FileSystem::fileSystemRepresentation(wpe_loader_get_loaded_implementation_library_name());
     106#endif
     107        nargs++;
     108
    103109        wpeSocket = GUniquePtr<gchar>(g_strdup_printf("%d", wpe_renderer_host_create_client()));
    104110        nargs++;
     
    128134    argv[i++] = webkitSocket.get();
    129135#if PLATFORM(WPE)
    130     if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web)
     136    if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web) {
     137        argv[i++] = const_cast<char*>(wpeBackendLibraryParameter.isNull() ? "-" : wpeBackendLibraryParameter.data());
    131138        argv[i++] = wpeSocket.get();
     139    }
    132140#endif
    133141#if ENABLE(NETSCAPE_PLUGIN_API)
  • trunk/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp

    r229209 r233763  
    3434#include <iostream>
    3535#include <libsoup/soup.h>
     36#include <wpe/wpe.h>
    3637
    3738using namespace WebCore;
     
    5758    bool parseCommandLine(int argc, char** argv) override
    5859    {
    59         ASSERT(argc == 4);
    60         if (argc < 4)
     60        ASSERT(argc == 5);
     61        if (argc < 5)
    6162            return false;
    6263
     
    6465            return false;
    6566
    66         int wpeFd = atoi(argv[3]);
     67#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0)
     68        wpe_loader_init(argv[3]);
     69#endif
     70
     71        int wpeFd = atoi(argv[4]);
    6772        RunLoop::main().dispatch(
    6873            [wpeFd] {
  • trunk/Tools/ChangeLog

    r233760 r233763  
     12018-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [WPE] Pass the backend library name as command line parameter to the web process
     4        https://bugs.webkit.org/show_bug.cgi?id=186841
     5
     6        Reviewed by Žan Doberšek.
     7
     8        * MiniBrowser/wpe/main.cpp:
     9        (main): Stop using WPE_BACKEND_LIBRARY env var.
     10        * Scripts/run-wpe-tests:
     11        (WPETestRunner.__init__): Ditto.
     12        * Scripts/webkitpy/port/wpe.py:
     13        (WPEPort.setup_environ_for_server): Ditto.
     14        * wpe/backends/ViewBackend.cpp:
     15        (WPEToolingBackends::ViewBackend::ViewBackend): Call wpe_loader_init() to ensure WPEBackend-fdo is used.
     16        * wpe/jhbuild.modules: Upgrade WPEBackend to version 0.2.0.
     17
    1182018-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Tools/MiniBrowser/wpe/main.cpp

    r232834 r233763  
    102102int main(int argc, char *argv[])
    103103{
    104     // MiniBrowser only works with WPEBackend-fdo, so ensure no other backend is used,
    105     // either by passing the WPE_BACKEND_LIBRARY env var or loading the default symlink.
    106     g_setenv("WPE_BACKEND_LIBRARY", "libWPEBackend-fdo-0.1.so", TRUE);
    107104#if ENABLE_DEVELOPER_MODE
    108105    g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
  • trunk/Tools/Scripts/run-wpe-tests

    r233362 r233763  
    3737        super(WPETestRunner, self).__init__("wpe", options, tests)
    3838
    39     def _setup_testing_environment(self):
    40         super(WPETestRunner, self)._setup_testing_environment()
    41         self._test_env["WPE_BACKEND_LIBRARY"] = "libWPEBackend-fdo-0.1.so"
    42 
    4339    def is_glib_test(self, test_program):
    4440        return os.path.basename(os.path.dirname(test_program)) in ["WPE", "JavaScriptCore"]
  • trunk/Tools/Scripts/webkitpy/port/wpe.py

    r233651 r233763  
    7171    def setup_environ_for_server(self, server_name=None):
    7272        environment = super(WPEPort, self).setup_environ_for_server(server_name)
    73         environment['WPE_BACKEND_LIBRARY'] = 'libWPEBackend-fdo-0.1.so'
    7473        environment['G_DEBUG'] = 'fatal-criticals'
    7574        environment['GSETTINGS_BACKEND'] = 'memory'
  • trunk/Tools/wpe/backends/ViewBackend.cpp

    r233421 r233763  
    3636    , m_height(height)
    3737{
     38#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0)
     39    wpe_loader_init("libWPEBackend-fdo-0.1.so");
     40#endif
    3841}
    3942
  • trunk/Tools/wpe/jhbuild.modules

    r232670 r233763  
    168168  <cmake id="wpebackend">
    169169    <branch repo="github.com" module="WebPlatformForEmbedded/WPEBackend.git"
    170             tag="761496dff51b6962200294b4fe2bc9529da731a8" />
     170            tag="411decf4875e7a5c858489206cdb7705a4bbb581" />
    171171  </cmake>
    172172
Note: See TracChangeset for help on using the changeset viewer.