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.
Created attachment 24277 [details] Leaks in the Object case
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.
Created attachment 24292 [details] Proposed patch
Comment on attachment 24292 [details] Proposed patch + StructureID::getEnumerablePropertyNames() ends up caling back to itself Typo *caling* r=me
Landed in r37508.