[Webkit-unassigned] [Bug 186841] [WPE] Pass the backend library name as command line parameter to the web process

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 24 23:58:14 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=186841

--- Comment #4 from Zan Dobersek <zan at falconsigh.net> ---
(In reply to Carlos Garcia Campos from comment #3)
> (In reply to Zan Dobersek from comment #2)
> > Comment on attachment 343145 [details]
> > WIP
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=343145&action=review
> > 
> > > Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:139
> > > +    if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web) {
> > >          argv[i++] = wpeSocket.get();
> > > +        if (wpeBackendLibraryParameter)
> > > +            argv[i++] = wpeBackendLibraryParameter.get();
> > > +    }
> > 
> > IMO the backend library name should be provided unconditionally. That means
> > wpe_loader_get_loaded_library_name() would always return the appropriate
> > library name.
> 
> But we can't know if the application called wpe_loader_init() at this point,
> and would break if using a previous version of WPEBackend. Actually, this
> patch is bumping the requirement, unless we add a way to make it conditional
> at build type.
> 

By this point, the UIProcess already had to load the implementation library since it was needed to create the wpe_view_backend instance. It's needed anyway in the next line in ProcessLauncherGLib when the wpe_renderer_host instance is asked to create a client.

If the application hasn't called wpe_loader_init() by now (while it should have called it at the very beginning of program's lifetime), it's already too late, and either the compile-time WPE_BACKEND, libWPEBackend-default.so, or the env-provided library name (in debug builds) was used. That's what should be passed on the command line.

> > I would also reorganize the WebProcess argument list:
> > $ WPEWebProcess <library.so> <wpe-fd> <wk-fd>
> 
> We can't do that, process and connection ids are handled by common code in
> ChildProcessMainBase::parseCommandLine(), so they need to be first. I don't
> think this is important anyway, since the web process is not expected to be
> launched by the user.

WebProcessMain implementation could adjust the argv and argc arguments that are passed to ChildProcessMainBase::parseCommandLine(), but OK, let's not do that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180625/e1677e7e/attachment.html>


More information about the webkit-unassigned mailing list