Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6e66de4fdc3071e358812e15ebb1db5dbcc32790
      
https://github.com/WebKit/WebKit/commit/6e66de4fdc3071e358812e15ebb1db5dbcc32790
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-06 (Mon, 06 Apr 2026)

  Changed paths:
    M Source/WebCore/dom/SelectorQuery.cpp

  Log Message:
  -----------
  SelectorQueryCache::add() should not evict cache entries unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=311547

Reviewed by Anne van Kesteren.

Previously, a random cache entry was evicted before checking if the
selector was already cached. This could wastefully evict a valid entry
on cache hit, or even evict the very entry about to be looked up.

Move eviction after ensure() so it only happens when a new entry is
actually inserted.

* Source/WebCore/dom/SelectorQuery.cpp:
(WebCore::SelectorQueryCache::add):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to