[Webkit-unassigned] [Bug 186216] ServicesOverlayController can hold references to Documents after you navigate away

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 9 10:46:45 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=186216

Wenson Hsieh <wenson_hsieh at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wenson_hsieh at apple.com

--- Comment #3 from Wenson Hsieh <wenson_hsieh at apple.com> ---
(In reply to Simon Fraser (smfr) from comment #0)
> ServiceOverlayController::Highlight() has a Ref<Range>, and Range has a
> Ref<Document>.
> 
> When you change the selection in a view, ServiceOverlayController makes a
> “potential highlight” Highlight, which retains the Document. If you then
> navigate, there’s nothing that clears that Highlight, until the selection
> changes.
> 
> We need to either have ServiceOverlayController use weak refs, or clear its
> highlights on navigation.

We should probably add logic to clear state underneath `Document::willBeRemovedFromFrame()` (similar to how some of the other controller-type objects have a `documentDetached` method).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220209/553e7f95/attachment.htm>


More information about the webkit-unassigned mailing list