Changeset 280971 in webkit
- Timestamp:
- Aug 12, 2021, 9:26:56 AM (5 years ago)
- Location:
- branches/safari-612.1.27.0-branch
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/performance/performance-measure-fetch-start-expected.txt (added)
-
LayoutTests/http/tests/performance/performance-measure-fetch-start.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/PerformanceTiming.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.1.27.0-branch/LayoutTests/ChangeLog
r280857 r280971 1 2021-08-12 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r280931. rdar://problem/81852494 4 5 REGRESSION (r278392) performance.measure should never throw an InvalidAccessError for fetchStart 6 https://bugs.webkit.org/show_bug.cgi?id=229008 7 <rdar://79960877> 8 9 Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-11 10 Reviewed by Chris Dumez. 11 12 Source/WebCore: 13 14 Test: http/tests/performance/performance-measure-fetch-start.html 15 16 PerformanceTiming::fetchStart is returning 0 when we get a main resource from the cache sometimes. 17 This is causing PerformanceUserTiming::convertMarkToTimestamp to throw an error, which it should. 18 Like PerformanceResourceTiming::fetchStart we need to fall back to ResourceLoadTiming::startTime 19 if the NetworkLoadMetrics doesn't have any useful data for us. 20 21 * page/PerformanceTiming.cpp: 22 (WebCore::PerformanceTiming::fetchStart const): 23 24 LayoutTests: 25 26 * http/tests/performance/performance-measure-fetch-start-expected.txt: Added. 27 * http/tests/performance/performance-measure-fetch-start.html: Added. 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280931 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2021-08-11 Alex Christensen <achristensen@webkit.org> 32 33 REGRESSION (r278392) performance.measure should never throw an InvalidAccessError for fetchStart 34 https://bugs.webkit.org/show_bug.cgi?id=229008 35 <rdar://79960877> 36 37 Reviewed by Chris Dumez. 38 39 * http/tests/performance/performance-measure-fetch-start-expected.txt: Added. 40 * http/tests/performance/performance-measure-fetch-start.html: Added. 41 1 42 2021-08-10 Russell Epstein <repstein@apple.com> 2 43 -
branches/safari-612.1.27.0-branch/Source/WebCore/ChangeLog
r280857 r280971 1 2021-08-12 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r280931. rdar://problem/81852494 4 5 REGRESSION (r278392) performance.measure should never throw an InvalidAccessError for fetchStart 6 https://bugs.webkit.org/show_bug.cgi?id=229008 7 <rdar://79960877> 8 9 Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-11 10 Reviewed by Chris Dumez. 11 12 Source/WebCore: 13 14 Test: http/tests/performance/performance-measure-fetch-start.html 15 16 PerformanceTiming::fetchStart is returning 0 when we get a main resource from the cache sometimes. 17 This is causing PerformanceUserTiming::convertMarkToTimestamp to throw an error, which it should. 18 Like PerformanceResourceTiming::fetchStart we need to fall back to ResourceLoadTiming::startTime 19 if the NetworkLoadMetrics doesn't have any useful data for us. 20 21 * page/PerformanceTiming.cpp: 22 (WebCore::PerformanceTiming::fetchStart const): 23 24 LayoutTests: 25 26 * http/tests/performance/performance-measure-fetch-start-expected.txt: Added. 27 * http/tests/performance/performance-measure-fetch-start.html: Added. 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280931 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2021-08-11 Alex Christensen <achristensen@webkit.org> 32 33 REGRESSION (r278392) performance.measure should never throw an InvalidAccessError for fetchStart 34 https://bugs.webkit.org/show_bug.cgi?id=229008 35 <rdar://79960877> 36 37 Reviewed by Chris Dumez. 38 39 Test: http/tests/performance/performance-measure-fetch-start.html 40 41 PerformanceTiming::fetchStart is returning 0 when we get a main resource from the cache sometimes. 42 This is causing PerformanceUserTiming::convertMarkToTimestamp to throw an error, which it should. 43 Like PerformanceResourceTiming::fetchStart we need to fall back to ResourceLoadTiming::startTime 44 if the NetworkLoadMetrics doesn't have any useful data for us. 45 46 * page/PerformanceTiming.cpp: 47 (WebCore::PerformanceTiming::fetchStart const): 48 1 49 2021-08-10 Russell Epstein <repstein@apple.com> 2 50 -
branches/safari-612.1.27.0-branch/Source/WebCore/page/PerformanceTiming.cpp
r280454 r280971 138 138 139 139 auto* metrics = networkLoadMetrics(); 140 if (!metrics) 141 return 0; 142 143 m_fetchStart = monotonicTimeToIntegerMilliseconds(metrics->fetchStart); 140 if (metrics) 141 m_fetchStart = monotonicTimeToIntegerMilliseconds(metrics->fetchStart); 142 143 if (!m_fetchStart) { 144 if (auto* timing = documentLoadTiming()) 145 m_fetchStart = monotonicTimeToIntegerMilliseconds(timing->startTime()); 146 } 147 148 // Like PerformanceResourceTiming::fetchStart, fetchStart is a required property 149 ASSERT(m_fetchStart); 144 150 return m_fetchStart; 145 151 }
Note:
See TracChangeset
for help on using the changeset viewer.