<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive."
   href="https://bugs.webkit.org/show_bug.cgi?id=150778#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add objC delegate callback for webProcessDidBecomeResponsive and webProcessDidBecomeUnresponsive."
   href="https://bugs.webkit.org/show_bug.cgi?id=150778">bug 150778</a>
              from <span class="vcard"><a class="email" href="mailto:yongjun_zhang&#64;apple.com" title="Yongjun Zhang &lt;yongjun_zhang&#64;apple.com&gt;"> <span class="fn">Yongjun Zhang</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=150778#c5">comment #5</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=264526&amp;action=diff" name="attach_264526" title="Fix style issues.">attachment 264526</a> <a href="attachment.cgi?id=264526&amp;action=edit" title="Fix style issues.">[details]</a></span>
&gt; Fix style issues.
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=264526&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=264526&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/API/APINavigationClient.h:87
&gt; &gt;      // FIXME: This function should not be part of this client.
&gt; &gt;      virtual void processDidCrash(WebKit::WebPageProxy&amp;) { }
&gt; &gt; +    virtual void processDidBecomeResponsive(WebKit::WebPageProxy&amp;) { }
&gt; &gt; +    virtual void processDidBecomeUnresponsive(WebKit::WebPageProxy&amp;) { }
&gt; 
&gt; If the comment applies to all three of these, then please reword it so it
&gt; says “These functions”.</span >

I will change.
<span class="quote">&gt; 
&gt; Why can’t WebKit2 implement the delegate by implementing the existing loader
&gt; client function? Why do we have to add this to the navigation client?</span >
&gt;

Looks like WebKit2 does have loader client delegate, but it is only implemented as the deprecated WKBrowsingContextLoadDelegatePrivate, which is where browsingContextControllerWebProcessDidCrash: stays. This patch follows the way how _webViewWebProcessDidCrash and webViewWebContentProcessDidTerminate: are implemented, and they are currently staying in the negation client (WKNavigationDelegate).

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/Cocoa/NavigationState.h:105
&gt; &gt; +        virtual void processDidBecomeResponsive(WebKit::WebPageProxy&amp;) override;
&gt; &gt; +        virtual void processDidBecomeUnresponsive(WebKit::WebPageProxy&amp;) override;
&gt; 
&gt; Please, no WebKit:: prefix here for the argument types for these new
&gt; functions (match the function just above).</span >

Fixed.

<span class="quote">&gt; 
&gt; &gt; Source/WebKit2/UIProcess/Cocoa/NavigationState.h:188
&gt; &gt; +        bool webViewWebProcessDidBecomeResponsive : 1;
&gt; &gt; +        bool webViewWebProcessDidBecomeUnresponsive : 1;
&gt; 
&gt; Not sure what order these booleans are in. It’s strange to have the new ones
&gt; at the bottom after the QuickLook ones. Maybe we should keep these
&gt; alphabetical instead of randomly ordered?</span >

Yeah, the ordering seems to random - they are not alphabetical. I will move these two bools next to webViewWebProcessDidCrash since they belong to the same category (webProcess related).
<span class="quote">&gt; 
&gt; &gt; Source/WebKit2/UIProcess/WebPageProxy.cpp:4863
&gt; &gt; -    m_loaderClient-&gt;processDidBecomeUnresponsive(*this);
&gt; &gt; +    if (m_navigationClient)
&gt; &gt; +        m_navigationClient-&gt;processDidBecomeUnresponsive(*this);
&gt; &gt; +    else
&gt; &gt; +        m_loaderClient-&gt;processDidBecomeUnresponsive(*this);
&gt; 
&gt; Skipping the loader client function just because we have a navigation client
&gt; doesn’t seem logical. Seems we should call both.</span >

Again, this is following the pattern of WebPageProxy::processDidCrash(). I agree it is odd to skip the loader client. Will file another bug.
<span class="quote">&gt; 
&gt; &gt; Source/WebKit2/UIProcess/WebPageProxy.cpp:4884
&gt; &gt; -    m_loaderClient-&gt;processDidBecomeResponsive(*this);
&gt; &gt; +    if (m_navigationClient)
&gt; &gt; +        m_navigationClient-&gt;processDidBecomeResponsive(*this);
&gt; &gt; +    else
&gt; &gt; +        m_loaderClient-&gt;processDidBecomeResponsive(*this);
&gt; 
&gt; Ditto.</span ></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>