[Webkit-unassigned] [Bug 146102] Do not store configuration parameters twice in WebProcessPool

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 18 22:57:37 PDT 2015


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

--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #2)
> Comment on attachment 255100 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=255100&action=review

Thanks for the review.

> > Source/WebKit2/UIProcess/WebProcessPool.cpp:357
> >  void WebProcessPool::setUsesNetworkProcess(bool usesNetworkProcess)
> >  {
> >  #if ENABLE(NETWORK_PROCESS)
> > -    m_usesNetworkProcess = usesNetworkProcess;
> > +    m_configuration->setUseNetworkProcess(usesNetworkProcess);
> 
> This is a subtle change in behavior.  Before, the configuration was
> unchanged if someone called WebProcessPool::setUsesNetworkProcess() (via
> WKContextSetUsesNetworkProcess(...)), but now it will be mutated.  I'm not
> sure if this is a big deal in practice.  The same is true with
> WebProcessPool::setMaximumNumberOfProcesses() and
> WebProcessPool::setProcessModel().

That's a good point, but there's no change in behaviour actually, because we were not using the copied configuration for those, but the members. So, you could create a WebProcessPool with usesNetworkProcess = true, a network process is ensured later, and then call WKContextSetUsesNetworkProcess(false) which set the m_usesNetworkProcess to false. WebProcessPool checked the value of m_usesNetworkProcess, so something is going to fail/crash at some point. Same would happen now with the configuration member only. We could try to prevent that in both cases, by ignoring any change in configuration after the first web process and the network process is launched.

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


More information about the webkit-unassigned mailing list