Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d3a56955837974185af2f5281fe8b90bb732de2
      
https://github.com/WebKit/WebKit/commit/5d3a56955837974185af2f5281fe8b90bb732de2
  Author: Pascoe <[email protected]>
  Date:   2024-11-22 (Fri, 22 Nov 2024)

  Changed paths:
    M Source/WebCore/history/BackForwardCache.cpp

  Log Message:
  -----------
  Fix crash in WebCore::FrameLoader::stopAllLoaders
rdar://139889795
https://bugs.webkit.org/show_bug.cgi?id=283575

Reviewed by Charlie Wolfe.

285233@main introduced a change that could cause a CachedPage to get destroyed 
while scripting isn't allowed.
This is because whenever m_cachedPageMap contains a PruningReason, if 
(item.isInBackForwardCache()) won't pass,
but the map can still contain the item identifier. This makes the add call do 
nothing, because the key is already
in the map, causing the CachedPage to get destroyed. This fixes that by using 
set, which will replace the PruningReason
in the map, which maintains the behavior before 285233@main.

* Source/WebCore/history/BackForwardCache.cpp:
(WebCore::BackForwardCache::addIfCacheable):

Canonical link: https://commits.webkit.org/286972@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