<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Do not store configuration parameters twice in WebProcessPool"
   href="https://bugs.webkit.org/show_bug.cgi?id=146102#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Do not store configuration parameters twice in WebProcessPool"
   href="https://bugs.webkit.org/show_bug.cgi?id=146102">bug 146102</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=146102#c2">comment #2</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=255100&amp;action=diff" name="attach_255100" title="Patch">attachment 255100</a> <a href="attachment.cgi?id=255100&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=255100&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=255100&amp;action=review</a></span >

Thanks for the review.

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

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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>