forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix site isolation overlay crash during teardown
https://bugs.webkit.org/show_bug.cgi?id=274612 rdar://128636304 Reviewed by Charlie Wolfe. The debug overlays are stored in a WeakHashMap from page to a vector of the overlays. However, when site isolation is on, whenever a value is being removed from the WeakHashMap because the page has been destrucuted, the overlay will try to access a WeakRef to the page, which crashes. To fix this, we make the page in a RegionOverlay stored as WeakPtr instead and check it before accessing it. * Source/WebCore/page/DebugPageOverlays.cpp: (WebCore::MouseWheelRegionOverlay::updateRegion): (WebCore::NonFastScrollableRegionOverlay::updateRegion): (WebCore::InteractionRegionOverlay::activeLayer const): (WebCore::InteractionRegionOverlay::activeRegion const): (WebCore::InteractionRegionOverlay::mouseEvent): (WebCore::SiteIsolationOverlay::drawRect): (WebCore::RegionOverlay::~RegionOverlay): (WebCore::RegionOverlay::protectedPage const): Deleted. Canonical link: https://commits.webkit.org/279386@main
- Loading branch information
Pascoe
committed
May 28, 2024
1 parent
c076205
commit 4d646a4
Showing
1 changed file
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters