RESOLVED INVALID 217078
Form with Input causes memory leak
https://bugs.webkit.org/show_bug.cgi?id=217078
Summary Form with Input causes memory leak
Clark Pan
Reported 2020-09-28 21:49:58 PDT
Created attachment 409963 [details] Test file to reproduce form and input element leak When a form with an input inside of it is detached and dereferenced, the memory associated with the form is not GC'ed Steps to reproduce: - Open provided example file in Safari (Desktop). (tested in Version 14.0 (15610.1.28.1.9, 15610), no extensions) - Open up Web Inspector -> Timelines -> Javascript Allocations. - Take a snapshot. - Click 'Click to add form' button a few times (mounts and unmounts a form and an input). - Take a snapshot. - Compare snapshots. Expected - No leaked memory Actual - The HTMLFormElement and HTMLInputElements are leaked. Notes: - Does not happen on iOS Safari with same webkit versions. - If its a stand alone <input> without a wrapping <form>, the same behaviour does not occur. - If there is no <input> inside the <form>, the HTMLFormElement is not leaked. - Looking at the path to root object within the snapshot inspector for the HTMLFormElement shows either: a) "This object is a root" b) A retaining path from an object via a property called "_controlUniqueIDToControlMap"
Attachments
Test file to reproduce form and input element leak (1.14 KB, text/html)
2020-09-28 21:49 PDT, Clark Pan
no flags
Alexey Proskuryakov
Comment 1 2020-09-29 09:23:27 PDT
Thank you for the report, and for the detailed analysis. This looks like an issue in Safari forms autofill code, not in WebKit. Keeping this open because I'm not entirely certain, but also importing to Apple internal system for investigation.
Radar WebKit Bug Importer
Comment 2 2020-09-29 09:23:38 PDT
Clark Pan
Comment 3 2020-10-26 16:05:07 PDT
Thanks for cross reporting to the Apple internal system Alexey. Is there a way to get some transparency on the progress of the ticket? Does the internal system auto report progress back out to the public system?
Alexey Proskuryakov
Comment 4 2020-10-26 16:14:25 PDT
I think that the best way would be for you to file your own report via feedbackassistant.apple.com, and then we could dupe mine to it. This way, you will have all standard communication via feedback assistant. Please post the report number here is you choose to go this path (it will start with FB). Marking INVALID, as I think we confirmed this to be a Safari issue.
Clark Pan
Comment 5 2020-10-26 19:33:02 PDT
Done: FB8828701
Note You need to log in before you can comment on or make changes to this bug.