mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 06:06:38 +00:00
Listing a String object's index names for for-in built one name per UTF-16 unit before any limit check, so a string within the heap limit could make the loop allocate many times that limit. The heap budget for all the names is now checked first, after a collection if needed, and each name takes a unit of fuel. A wrapper made by ToObject stays rooted while the names are listed.