bellard / quickjs

Public repository of the QuickJS Javascript Engine.
https://bellard.org/quickjs
Other
8.51k stars 892 forks source link

Fix GC leak in handling of `JS_IteratorNext()` result #301

Open xeioex opened 6 months ago

xeioex commented 6 months ago

The code below triggers all the fixed code-paths.

function* f() {
   return [];
}

Array.from(f());
AggregateError(f());
Uint8Array.from(f());
Promise.race(f());
Promise.all(f());
Object.groupBy(f(), ({ type }) => type);
[...f()]