| Summary: | StaticRange should keep its start and end containers alive | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
| Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cdumez, darin, esprehn+autocc, ews-watchlist, ggaren, kangil.han, kondapallykalyan, megan_gardner, saam, webkit-bug-importer, wenson_hsieh | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Ryosuke Niwa
2021-01-29 21:07:17 PST
Created attachment 418807 [details]
Fixes the bug
Comment on attachment 418807 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=418807&action=review > Source/WebCore/ChangeLog:9 > + To do that, we sff them as opaque roots during the marking phase in visitAdditionalChildren. Nit - sff => add (In reply to Wenson Hsieh from comment #2) > Comment on attachment 418807 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=418807&action=review > > > Source/WebCore/ChangeLog:9 > > + To do that, we sff them as opaque roots during the marking phase in visitAdditionalChildren. > > Nit - sff => add Fixed. Thanks for the review! Committed r272114: <https://trac.webkit.org/changeset/272114> Should we add a test to make sure that we can’t create a reference cycle that causes leaks by having a static range as the value of a property on one of its endpoint nodes? (In reply to Darin Adler from comment #6) > Should we add a test to make sure that we can’t create a reference cycle > that causes leaks by having a static range as the value of a property on one > of its endpoint nodes? Maybe? I guess we can artificially introduce a leaking bug & verify the test works? We have tests for this, like LayoutTests/fast/dom/reference-cycle-leaks.html, but I don’t think we have one that covers StaticRange. (In reply to Darin Adler from comment #8) > We have tests for this, like > LayoutTests/fast/dom/reference-cycle-leaks.html, but I don’t think we have > one that covers StaticRange. Alright, filed https://bugs.webkit.org/show_bug.cgi?id=222786 to add those tests. |