Bug 157986 - Add a few initiator tests to resource timing.
Summary: Add a few initiator tests to resource timing.
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-23 03:41 PDT by Yoav Weiss
Modified: 2016-05-24 12:48 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.94 KB, patch)
2016-05-23 03:43 PDT, Yoav Weiss
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yoav Weiss 2016-05-23 03:41:29 PDT
Add a few initiator tests to resource timing.
Comment 1 Yoav Weiss 2016-05-23 03:43:15 PDT
Created attachment 279559 [details]
Patch
Comment 2 Yoav Weiss 2016-05-23 03:47:48 PDT
This adds some tests that make sure initiator info doesn't get overridden when later requests try to store RT info for the same resource.

Currently implementation relies on the fact that HashMap avoids adding entries for keys that are already in the map. Is that part of the semantics of HashMap and can be relied on, or is it necessary to add a check before attempts to add initiator info for a resource?
Comment 3 Alex Christensen 2016-05-23 11:15:47 PDT
HashMap::add does nothing if the key is already in the map, even if you're trying to add it with a different value.  HashMap::set will overwrite an existing value for the given key.  This behavior won't change.
Comment 4 Yoav Weiss 2016-05-23 12:44:12 PDT
(In reply to comment #3)
> HashMap::add does nothing if the key is already in the map, even if you're
> trying to add it with a different value.  HashMap::set will overwrite an
> existing value for the given key.  This behavior won't change.

cool, didn't know that. In that case, no need to add further checks
Comment 5 Yoav Weiss 2016-05-23 23:07:38 PDT
Comment on attachment 279559 [details]
Patch

Thanks for reviewing! :)
Comment 6 WebKit Commit Bot 2016-05-23 23:28:51 PDT
Comment on attachment 279559 [details]
Patch

Clearing flags on attachment: 279559

Committed r201323: <http://trac.webkit.org/changeset/201323>
Comment 7 WebKit Commit Bot 2016-05-23 23:28:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Ryan Haddad 2016-05-24 12:47:52 PDT
Reverted r201323 for reason:

One of the LayoutTests added with this change fails on all platforms. Rolling out until ResourceTiming flakiness fix is landed

Committed r201343: <http://trac.webkit.org/changeset/201343>