[webkit-changes] [WebKit/WebKit] 8096a9: imported/w3c/web-platform-tests/preload/moduleprel...

Ryosuke Niwa noreply at github.com
Tue Apr 11 00:15:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8096a949d5f7ae89892cb6d30bb48172e07d0af5
      https://github.com/WebKit/WebKit/commit/8096a949d5f7ae89892cb6d30bb48172e07d0af5
  Author: Ryosuke Niwa <rniwa at webkit.org>
  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




More information about the webkit-changes mailing list