Title: [279442] trunk/Source/WebCore
Revision
279442
Author
[email protected]
Date
2021-06-30 16:51:58 -0700 (Wed, 30 Jun 2021)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (279441 => 279442)


--- trunk/Source/WebCore/ChangeLog	2021-06-30 23:36:34 UTC (rev 279441)
+++ trunk/Source/WebCore/ChangeLog	2021-06-30 23:51:58 UTC (rev 279442)
@@ -1,3 +1,22 @@
+2021-06-30  Alex Christensen  <[email protected]>
+
+        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):
+
 2021-06-30  Ryosuke Niwa  <[email protected]>
 
         Use WeakHashMap and WeakPtr with Node in more places

Modified: trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp (279441 => 279442)


--- trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp	2021-06-30 23:36:34 UTC (rev 279441)
+++ trunk/Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp	2021-06-30 23:51:58 UTC (rev 279442)
@@ -601,7 +601,7 @@
         return;
 
     double elapsedFinishTime;
-    if (networkLoadMetrics.isComplete())
+    if (networkLoadMetrics.responseEnd)
         elapsedFinishTime = m_environment.executionStopwatch().elapsedTimeSince(networkLoadMetrics.responseEnd).seconds();
     else
         elapsedFinishTime = timestamp();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to