[Webkit-unassigned] [Bug 247984] References to iframes seem do not get garbage collected

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 26 08:48:55 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=247984

--- Comment #17 from Chris Dumez <cdumez at apple.com> ---
I have tried the following test case:
```
for (var i = 0; i < 100000; i++) {
    setTimeout(() => {
        document.body.appendChild(document.createElement('iframe'));
        document.querySelector('iframe').remove();
    }, 0);
}
```

We do NOT have a leak. I added logging and I see iframes getting destroyed (The HTMLIFrameElement destructor is getting called).

However, it is true that GC is not destroying frames as fast as they are constructed. I see the number of HTMLIframeElement instances steadily growing (despite some frames getting destroyed along the way).

Given that this is not a leak, I am not sure what to do on WebCore side. To me, this looks like GC not being aggressive enough.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230426/168c609d/attachment.htm>


More information about the webkit-unassigned mailing list