[Webkit-unassigned] [Bug 194830] [WPE] Do not create a PlatformDisplay in the Service Worker process

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 27 17:49:58 PST 2019


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

--- Comment #12 from Loïc Yhuel <loic.yhuel at softathome.com> ---
(In reply to Zan Dobersek from comment #8)
> Instead of the extra bool parameter to this method, there should be an extra
> bool variable `isServiceWorkerProcess` added to WebProcessCreationParameters
> for the WPE port. It would be initialized in
> WebProcessPool::initializeNewWebProcess() before the
> platformInitializeWebProcess() call.

Done.

I did put in under "#if ENABLE(SERVICE_WORKER)", but I don't know if it's the right choice, since it makes the patch more complicated since those flags must be replicated in several places.

The code style guidelines also don't mention the case of flags mixed with blocks, and I didn't find examples when searching quickly.

First solution, with the "if (1)" to avoid any possible -Wmisleading-indentation :
#if ENABLE(SERVICE_WORKER)
    if (!parameters.isServiceWorkerProcess)
#else
    if (1)
#endif
        parameters.hostClientFileDescriptor = wpe_renderer_host_create_client();

Second solution, with a one-line block (would be against the rules without the #if) :
#if ENABLE(SERVICE_WORKER)
    if (!parameters.isServiceWorkerProcess)
#endif
    {
        parameters.hostClientFileDescriptor = wpe_renderer_host_create_client();
    }

-- 
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/20190228/126ee5af/attachment.html>


More information about the webkit-unassigned mailing list