Changeset 279442 in webkit


Ignore:
Timestamp:
Jun 30, 2021, 4:51:58 PM (4 years ago)
Author:
achristensen@apple.com
Message:

REGRESSION(r278391) Sometimes load durations show up as large negative numbers in WebInspector
https://bugs.webkit.org/show_bug.cgi?id=227413
<rdar://79801896>

Reviewed by Chris Dumez.

In r278391 I changed the meaning of members of NetworkLoadMetrics from Seconds deltas from fetchStart
to the MonotonicTime at which each event occurred. I also changed InspectorNetworkAgent::didFinishLoading
accordingly, but I overlooked the fact that sometimes we get empty NetworkLoadMetrics that have been marked as complete,
such as from NetworkResourceLoader::didFinishWithRedirectResponse which indicates that it is complete but
members such as responseEnd are still 0. Rather than check if it is complete, check if the member is nonzero.

The layout test http/tests/inspector/network/resource-timing.html would fail on AS Macs when run after other tests before this change.

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didFinishLoading):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r279439 r279442  
     12021-06-30  Alex Christensen  <achristensen@webkit.org>
     2
     3        REGRESSION(r278391) Sometimes load durations show up as large negative numbers in WebInspector
     4        https://bugs.webkit.org/show_bug.cgi?id=227413
     5        <rdar://79801896>
     6
     7        Reviewed by Chris Dumez.
     8
     9        In r278391 I changed the meaning of members of NetworkLoadMetrics from Seconds deltas from fetchStart
     10        to the MonotonicTime at which each event occurred.  I also changed InspectorNetworkAgent::didFinishLoading
     11        accordingly, but I overlooked the fact that sometimes we get empty NetworkLoadMetrics that have been marked as complete,
     12        such as from NetworkResourceLoader::didFinishWithRedirectResponse which indicates that it is complete but
     13        members such as responseEnd are still 0.  Rather than check if it is complete, check if the member is nonzero.
     14
     15        The layout test http/tests/inspector/network/resource-timing.html would fail on AS Macs when run after other tests before this change.
     16
     17        * inspector/agents/InspectorNetworkAgent.cpp:
     18        (WebCore::InspectorNetworkAgent::didFinishLoading):
     19
    1202021-06-30  Ryosuke Niwa  <rniwa@webkit.org>
    221
  • trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp

    r278717 r279442  
    602602
    603603    double elapsedFinishTime;
    604     if (networkLoadMetrics.isComplete())
     604    if (networkLoadMetrics.responseEnd)
    605605        elapsedFinishTime = m_environment.executionStopwatch().elapsedTimeSince(networkLoadMetrics.responseEnd).seconds();
    606606    else
Note: See TracChangeset for help on using the changeset viewer.