NEW186216
ServicesOverlayController can hold references to Documents after you navigate away
https://bugs.webkit.org/show_bug.cgi?id=186216
Summary ServicesOverlayController can hold references to Documents after you navigate...
Simon Fraser (smfr)
Reported 2018-06-01 17:50:20 PDT
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.
Attachments
Simon Fraser (smfr)
Comment 1 2018-06-01 17:50:34 PDT
Simon Fraser (smfr)
Comment 2 2018-06-01 17:51:54 PDT
This is visible with any layout test that makes a selection (like LayoutTests/fast/css/counters/counter-after-style-crash.html) and the patch in bug 186214
Wenson Hsieh
Comment 3 2022-02-09 10:46:45 PST
(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).
Note You need to log in before you can comment on or make changes to this bug.