RESOLVED FIXED 21533
Simple JavaScript code leaks StructureIDs
https://bugs.webkit.org/show_bug.cgi?id=21533
Summary Simple JavaScript code leaks StructureIDs
Cameron Zwarich (cpst)
Reported 2008-10-10 15:36:06 PDT
The code for (var id in (new Array)) { } leaks 13 StructureIDs (in addition to the ones in JSGlobalData) the first time you load it, and then it leaks 2 more every time you load it. The code for (var id in (new Object)) { } leaks 11 StructureIDs the first time you load it, but does not leak any more when you load it again.
Attachments
Leaks in the Object case (87.31 KB, text/plain)
2008-10-10 15:58 PDT, Cameron Zwarich (cpst)
no flags
Proposed patch (3.62 KB, patch)
2008-10-11 13:50 PDT, Cameron Zwarich (cpst)
sam: review+
Cameron Zwarich (cpst)
Comment 1 2008-10-10 15:58:23 PDT
Created attachment 24277 [details] Leaks in the Object case
Cameron Zwarich (cpst)
Comment 2 2008-10-10 16:30:55 PDT
The leaks in the Array case are similar, and nothing seems Array-specific, so it is probably best to figure out the cause of the Object case first.
Cameron Zwarich (cpst)
Comment 3 2008-10-11 13:50:49 PDT
Created attachment 24292 [details] Proposed patch
Sam Weinig
Comment 4 2008-10-11 13:53:12 PDT
Comment on attachment 24292 [details] Proposed patch + StructureID::getEnumerablePropertyNames() ends up caling back to itself Typo *caling* r=me
Cameron Zwarich (cpst)
Comment 5 2008-10-11 13:59:10 PDT
Landed in r37508.
Note You need to log in before you can comment on or make changes to this bug.