| Summary: | IntersectionObserver leaks documents | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
| Component: | WebCore Misc. | Assignee: | Ali Juma <ajuma> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | ajuma, ap, cdumez, cmarcelo, commit-queue, dbates, esprehn+autocc, ews-watchlist, kangil.han, kondapallykalyan, simon.fraser, tsavell, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 159475 | ||||||||
| Attachments: |
|
||||||||
|
Description
Simon Fraser (smfr)
2018-08-29 16:47:50 PDT
Started looking into this. Using the approach from bug 186873 (making the callback a WeakCallback and using [CustomIsReachable] to add logic to keep the callback alive as long as we need it) seems to be the way to go here. Created attachment 348969 [details]
Patch
Comment on attachment 348969 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=348969&action=review > Source/WebCore/ChangeLog:8 > + Currently,`Documents own IntersectionObservers while IntersectionObservers own callbacks Errant backtick. Created attachment 349020 [details]
Patch for landing
Comment on attachment 349020 [details] Patch for landing Clearing flags on attachment: 349020 Committed r235736: <https://trac.webkit.org/changeset/235736> All reviewed patches have been landed. Closing bug. Looks like the new test added in: https://trac.webkit.org/changeset/235736/webkit Is a flakey timeout: intersection-observer/no-document-leak.html History: https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=intersection-observer%2Fno-document-leak.html Diff: https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/r236149%20(12846)/intersection-observer/no-document-leak-pretty-diff.html (In reply to Truitt Savell from comment #8) > Looks like the new test added in: > https://trac.webkit.org/changeset/235736/webkit > > Is a flakey timeout: intersection-observer/no-document-leak.html > > History: > https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard. > html#showAllRuns=true&tests=intersection-observer%2Fno-document-leak.html > > Diff: > https://build.webkit.org/results/Apple%20Sierra%20Release%20WK1%20(Tests)/ > r236149%20(12846)/intersection-observer/no-document-leak-pretty-diff.html Tracking this in https://bugs.webkit.org/show_bug.cgi?id=189731. |