WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160963
Resource Timing: Make PerformanceEntryList a sequence as per spec
https://bugs.webkit.org/show_bug.cgi?id=160963
Summary
Resource Timing: Make PerformanceEntryList a sequence as per spec
Johan K. Jensen
Reported
2016-08-18 10:36:29 PDT
PerformanceEntryList should be iterable as per the current spec:
https://www.w3.org/TR/2016/WD-performance-timeline-2-20160421/#idl-def-performanceentrylist
.
Attachments
Patch
(31.62 KB, patch)
2016-08-18 12:14 PDT
,
Johan K. Jensen
no flags
Details
Formatted Diff
Diff
Patch
(32.07 KB, patch)
2016-08-18 15:47 PDT
,
Johan K. Jensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Johan K. Jensen
Comment 1
2016-08-18 12:14:14 PDT
Created
attachment 286385
[details]
Patch
Alex Christensen
Comment 2
2016-08-18 14:01:04 PDT
Comment on
attachment 286385
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=286385&action=review
> Source/WebCore/page/Performance.cpp:92 > -RefPtr<PerformanceEntryList> Performance::getEntries() const > +Vector<RefPtr<PerformanceEntry>> Performance::getEntries() const
Could these be Ref<PerformanceEntry>s?
> Source/WebCore/page/Performance.cpp:105 > + std::sort(entries.begin(), entries.end(), PerformanceEntry::startTimeCompareLessThan);
do we have to sort everything?
Chris Dumez
Comment 3
2016-08-18 14:04:10 PDT
Comment on
attachment 286385
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=286385&action=review
> LayoutTests/http/tests/performance/performance-resource-timing-entries-iterable-expected.txt:1 > +PASS resources is an instance of Array
Would be nice if this test had a description.
> LayoutTests/http/tests/performance/performance-resource-timing-entries-iterable.html:3 > +<script>
description("....");
Chris Dumez
Comment 4
2016-08-18 14:05:56 PDT
Comment on
attachment 286385
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=286385&action=review
> Source/WebCore/page/Performance.h:67 > + Vector<RefPtr<PerformanceEntry>> getEntriesByType(const String& entryType);
Why is this not const?
> Source/WebCore/page/Performance.h:68 > + Vector<RefPtr<PerformanceEntry>> getEntriesByName(const String& name, const String& entryType);
Why is this not const?
Johan K. Jensen
Comment 5
2016-08-18 15:46:58 PDT
(In reply to
comment #2
)
> > Source/WebCore/page/Performance.cpp:92 > > -RefPtr<PerformanceEntryList> Performance::getEntries() const > > +Vector<RefPtr<PerformanceEntry>> Performance::getEntries() const > > Could these be Ref<PerformanceEntry>s?
Some of the User Timing code uses PassRefPtr, so it should probably be updated in another patch.
> > > Source/WebCore/page/Performance.cpp:105 > > + std::sort(entries.begin(), entries.end(), PerformanceEntry::startTimeCompareLessThan); > > do we have to sort everything?
Yes, per the spec we should sort them by start time. Entries gets added according to responseEnd. (In reply to
comment #3
)
> > LayoutTests/http/tests/performance/performance-resource-timing-entries-iterable-expected.txt:1 > > +PASS resources is an instance of Array > > Would be nice if this test had a description.
Ah, yeah. (In reply to
comment #4
)
> > Source/WebCore/page/Performance.h:67 > > + Vector<RefPtr<PerformanceEntry>> getEntriesByType(const String& entryType); > > Why is this not const?
Hm... Don’t see any reason why it isn’t.
Johan K. Jensen
Comment 6
2016-08-18 15:47:13 PDT
Created
attachment 286406
[details]
Patch
Chris Dumez
Comment 7
2016-08-18 15:49:06 PDT
Comment on
attachment 286406
[details]
Patch lgtm
WebKit Commit Bot
Comment 8
2016-08-19 11:31:49 PDT
Comment on
attachment 286406
[details]
Patch Clearing flags on attachment: 286406 Committed
r204641
: <
http://trac.webkit.org/changeset/204641
>
WebKit Commit Bot
Comment 9
2016-08-19 11:31:53 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug