Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8096a949d5f7ae89892cb6d30bb48172e07d0af5
      
https://github.com/WebKit/WebKit/commit/8096a949d5f7ae89892cb6d30bb48172e07d0af5
  Author: Ryosuke Niwa <[email protected]>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/loader/ResourceTimingInformation.cpp
    M Source/WebCore/loader/ResourceTimingInformation.h

  Log Message:
  -----------
  imported/w3c/web-platform-tests/preload/modulepreload.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=255242
<rdar://107840455>

Reviewed by Alexey Shvayka.

The flakiness was caused by ResourceTimingInformation using pointer value as 
its key for m_initiatorMap.
When two resources of the same document happen to be allocated at the same 
address (at two different times),
we erroneously conclude that the second resource's timing information had 
already been added in
ResourceTimingInformation::addResourceTiming because there is a matching entry 
in m_initiatorMap.

Fixed the bug by using WeakHashMap in ResourceTimingInformation to make the 
identity of CachedResource deterministic.

* LayoutTests/TestExpectations:
* Source/WebCore/loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):
(WebCore::ResourceTimingInformation::removeResourceTiming):
(WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation):
* Source/WebCore/loader/ResourceTimingInformation.h:

Canonical link: https://commits.webkit.org/262810@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to