WebKit Bugzilla
Attachment 343490 Details for
Bug 186841
: [WPE] Pass the backend library name as command line parameter to the web process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
wpe-backend-library.diff (text/plain), 5.10 KB, created by
Carlos Garcia Campos
on 2018-06-25 01:05:26 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2018-06-25 01:05:26 PDT
Size:
5.10 KB
patch
obsolete
>diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >index bebf0f7897f..c67a9b8e028 100644 >--- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >+++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >@@ -99,7 +99,12 @@ void ProcessLauncher::launchProcess() > > #if PLATFORM(WPE) > GUniquePtr<gchar> wpeSocket; >+ GUniquePtr<gchar> wpeBackendLibraryParameter; > if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web) { >+#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 1, 0) >+ wpeBackendLibraryParameter.reset(g_strdup_printf("--backend-library=%s", wpe_loader_get_loaded_implementation_library_name())); >+ nargs++; >+#endif > wpeSocket = GUniquePtr<gchar>(g_strdup_printf("%d", wpe_renderer_host_create_client())); > nargs++; > } >@@ -127,8 +132,11 @@ void ProcessLauncher::launchProcess() > argv[i++] = processIdentifier.get(); > argv[i++] = webkitSocket.get(); > #if PLATFORM(WPE) >- if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web) >+ if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web) { > argv[i++] = wpeSocket.get(); >+ if (wpeBackendLibraryParameter) >+ argv[i++] = wpeBackendLibraryParameter.get(); >+ } > #endif > #if ENABLE(NETSCAPE_PLUGIN_API) > argv[i++] = const_cast<char*>(realPluginPath.data()); >diff --git a/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp b/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp >index 8e7766e14af..2bb060ba272 100644 >--- a/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp >+++ b/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp >@@ -33,6 +33,7 @@ > #include <glib.h> > #include <iostream> > #include <libsoup/soup.h> >+#include <wpe/wpe.h> > > using namespace WebCore; > >@@ -56,7 +57,7 @@ public: > > bool parseCommandLine(int argc, char** argv) override > { >- ASSERT(argc == 4); >+ ASSERT(argc == 4 || argc == 5); > if (argc < 4) > return false; > >@@ -64,6 +65,13 @@ public: > return false; > > int wpeFd = atoi(argv[3]); >+#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 1, 0) >+ if (argc > 4) { >+ static const unsigned parameterLength = strlen("--backend-library="); >+ if (!strncmp(argv[4], "--backend-library=", parameterLength)) >+ wpe_loader_init(argv[4] + parameterLength); >+ } >+#endif > RunLoop::main().dispatch( > [wpeFd] { > RELEASE_ASSERT(is<PlatformDisplayWPE>(PlatformDisplay::sharedDisplay())); >diff --git a/Tools/MiniBrowser/wpe/main.cpp b/Tools/MiniBrowser/wpe/main.cpp >index 00dd49e5e7f..a490c4b48de 100644 >--- a/Tools/MiniBrowser/wpe/main.cpp >+++ b/Tools/MiniBrowser/wpe/main.cpp >@@ -101,9 +101,6 @@ static std::unique_ptr<WPEToolingBackends::ViewBackend> createViewBackend(uint32 > > int main(int argc, char *argv[]) > { >- // MiniBrowser only works with WPEBackend-fdo, so ensure no other backend is used, >- // either by passing the WPE_BACKEND_LIBRARY env var or loading the default symlink. >- g_setenv("WPE_BACKEND_LIBRARY", "libWPEBackend-fdo-0.1.so", TRUE); > #if ENABLE_DEVELOPER_MODE > g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE); > #endif >diff --git a/Tools/Scripts/run-wpe-tests b/Tools/Scripts/run-wpe-tests >index 18bd1d401f2..c3b7bd26c60 100755 >--- a/Tools/Scripts/run-wpe-tests >+++ b/Tools/Scripts/run-wpe-tests >@@ -34,10 +34,6 @@ class WPETestRunner(TestRunner): > def __init__(self, options, tests=[]): > super(WPETestRunner, self).__init__("wpe", options, tests) > >- def _setup_testing_environment(self): >- super(WPETestRunner, self)._setup_testing_environment() >- self._test_env["WPE_BACKEND_LIBRARY"] = "libWPEBackend-fdo-0.1.so" >- > def is_glib_test(self, test_program): > return os.path.basename(os.path.dirname(test_program)) in ["WPE", "JavaScriptCore"] > >diff --git a/Tools/Scripts/webkitpy/port/wpe.py b/Tools/Scripts/webkitpy/port/wpe.py >index cf78cbc0cb3..b72f4e2d95d 100644 >--- a/Tools/Scripts/webkitpy/port/wpe.py >+++ b/Tools/Scripts/webkitpy/port/wpe.py >@@ -70,7 +70,6 @@ class WPEPort(Port): > > def setup_environ_for_server(self, server_name=None): > environment = super(WPEPort, self).setup_environ_for_server(server_name) >- environment['WPE_BACKEND_LIBRARY'] = 'libWPEBackend-fdo-0.1.so' > environment['G_DEBUG'] = 'fatal-criticals' > environment['GSETTINGS_BACKEND'] = 'memory' > environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so') >diff --git a/Tools/wpe/backends/ViewBackend.cpp b/Tools/wpe/backends/ViewBackend.cpp >index 3d0ac69c3a2..66c7f4de720 100644 >--- a/Tools/wpe/backends/ViewBackend.cpp >+++ b/Tools/wpe/backends/ViewBackend.cpp >@@ -35,6 +35,9 @@ ViewBackend::ViewBackend(uint32_t width, uint32_t height) > : m_width(width) > , m_height(height) > { >+#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 1, 0) >+ wpe_loader_init("libWPEBackend-fdo-0.1.so"); >+#endif > } > > ViewBackend::~ViewBackend()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186841
:
343145
|
343490
|
344677
|
344682
|
344685