Bug 237672 - Document is leaking on haaretz.co.il due to an async script
Summary: Document is leaking on haaretz.co.il due to an async script
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-09 12:32 PST by Chris Dumez
Modified: 2022-05-26 14:46 PDT (History)
16 users (show)

See Also:


Attachments
Patch (8.22 KB, patch)
2022-03-09 12:39 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (8.30 KB, patch)
2022-03-09 18:03 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (3.08 KB, patch)
2022-03-10 09:22 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-03-09 12:32:30 PST
Document is leaking on haaretz.co.il due to an async script.
Comment 1 Radar WebKit Bug Importer 2022-03-09 12:32:49 PST
<rdar://problem/90050632>
Comment 2 Chris Dumez 2022-03-09 12:39:01 PST
Created attachment 454276 [details]
Patch
Comment 3 Chris Dumez 2022-03-09 18:03:49 PST
Created attachment 454305 [details]
Patch
Comment 4 Chris Dumez 2022-03-09 19:17:47 PST
Comment on attachment 454305 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=454305&action=review

> Source/WebCore/ChangeLog:18
> +        its element is part of the DOM, in which case it would be kept alive.

Looks like I was wrong. Based on LayoutTests/http/tests/misc/async-script.html, it is expected that a Script that was part of the document executes, even if it gets removed from the Document in between.
I'll work on an alternative solution.
Comment 5 Chris Dumez 2022-03-10 09:22:46 PST
Created attachment 454369 [details]
Patch
Comment 6 Geoffrey Garen 2022-03-10 12:41:08 PST
Comment on attachment 454369 [details]
Patch

r=me
Comment 7 EWS 2022-03-10 13:28:45 PST
Committed r291127 (248287@main): <https://commits.webkit.org/248287@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454369 [details].
Comment 8 Brent Fulgham 2022-05-26 14:46:16 PDT
This fix shipped with Safari 15.5 (all platforms).