Skip to content

lib: make safe primordials safe to iterate

MapIterator and SetIterator are user-mutable, I think it makes sense to be able to iterate over SafeMap and SafeSet without calling possibly-user-mutated code.

Note that patterns such as for (const [key, value] of safeMap) would still be potentially "unsafe" as it executes %ArrayIteratorPrototype%.next when destructuring, which may have been mutated in user-land.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading