[Webkit-unassigned] [Bug 145466] Web Inspector: Activity Viewer does not update on "Clear Log on reload"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 2 15:57:03 PDT 2015


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

--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org> ---
> 1. Isolate logic within LogManager and remove hacks/logic from all other
> files
> 2. Within LogManager: Differentiate "messagesCleared" calls
>  a) that happen as a result of a "requested clear" by Frontend (e.g. Button)
>  b) that happen on page reload and install "clear/keep-on-page-reload" logic
>  c) that happen on frame navigated, console.clear() or clear()
> 3. Unify "ActiveLogCleared" and "Cleared" events to "Cleared"
> 
> For step 2b and 2c it is important to delay the handling and wait until
> "_mainResourceDidChange" has determined whether a page reload happened or
> not.

This is excellent. This information should really go in the ChangeLog, so that when someone next works in this area they can see the high level decision making process.

--

Looking at a navigation versus a reload.

    # Navigation

        backend: {"method":"Page.frameStartedLoading",...}
        backend: {"method":"Network.requestWillBeSent",...}
        backend: {"method":"Network.responseReceived",...}
        backend: {"method":"Network.dataReceived",...}
        backend: {"method":"Console.messagesCleared"}
        backend: {"method":"Page.frameNavigated",...}

    # Reload

        frontend: {"method":"Page.reload","id":29}
        backend: {"method":"Page.frameStartedLoading",...}
        backend: {"method":"Network.responseReceived",...}
        backend: {"method":"Network.dataReceived",...}
        backend: {"method":"Console.messagesCleared"}
        backend: {"method":"Page.frameNavigated",...}

So the behavior here is:

    => messagesCleared
      => requested?
        => Cleared
      => was not requested?
        => setTimeout(delayed, 0) to determine if the navigation (and thus the type of navigation) or if no navigation then JS clear()

    => frameNavigated
      => MainResourceDidChange
        => mark if reload

    => timeout trigger
      => we know if it was a reload or something else

This sounds good!

If we decide to make the backend not send messagesCleared during page navigation, then there is nothing that we need to do here. The drawback is that there will be a setTimeout(0) even though it wouldn't strictly be necessary. We may be able to address that.

-- 
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/20150602/1a0ce94c/attachment.html>


More information about the webkit-unassigned mailing list