Bug 237672

Summary: Document is leaking on haaretz.co.il due to an async script
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, changseok, dino, esprehn+autocc, ews-watchlist, fmalita, ggaren, gyuyoung.kim, kangil.han, pdr, sabouhallawa, schenney, sergio, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=237660
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

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).