Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f044942fbcb02a01fefab9f52e102d45f7986944
      
https://github.com/WebKit/WebKit/commit/f044942fbcb02a01fefab9f52e102d45f7986944
  Author: Franco Vieira de Souza <[email protected]>
  Date:   2025-10-01 (Wed, 01 Oct 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/imported/w3c/web-platform-tests/event-timing/event-counts-maplike-iterators-always-updated-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/event-timing/event-counts-maplike-iterators-always-updated.html
    A 
LayoutTests/imported/w3c/web-platform-tests/event-timing/event-counts-maplike-validate-iterators-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/event-timing/event-counts-maplike-validate-iterators.html
    M 
LayoutTests/imported/w3c/web-platform-tests/event-timing/idlharness.any-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/event-timing/idlharness.window-expected.txt
    M Source/WebCore/bindings/js/JSDOMMapLike.h
    M Source/WebCore/page/EventCounts.cpp
    M Source/WebCore/page/EventCounts.h
    M Source/WebCore/page/EventCounts.idl

  Log Message:
  -----------
  Implement EventCounts as maplike
https://bugs.webkit.org/show_bug.cgi?id=299211
rdar://160968888

Reviewed by Youenn Fablet.

Implements the EventCounts interface as a maplike, which
provides methods such as .forEach(), keys(), etc.

EventCounts cannot use the previous maplike implementation
because it would get out of sync after the backing map is
initialized. To solve this, we use the trait
shouldAlwaysInitializeMapLike to decide if the backing map
should be reloaded on every access through the wrapper. The trait
simply checks for the presence of a marker
(shouldAlwaysInitializeMapLikeMarker).

This implementation isn't perfect: although the backing map
will be kept up-to-date when accessed through the wrapper,
it won't be updated if accessed through an iterator generated
from that map. This is documented by the failing test
event-timing/event-counts-maplike-iterators-always-updated.html.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to