es6-shim icon indicating copy to clipboard operation
es6-shim copied to clipboard

native Promise broken in node 10.0 and 10.1

Open ljharb opened this issue 6 years ago • 1 comments

in node < 10, or 10.2+, the following code in the REPL shows a rejected promise. in node 10.0 and 10.1, however, the promise is forever pending.

var r, p = new Promise(y => { r = y; }); r({ then() { throw 42; } }); p;

ljharb avatar Mar 08 '19 08:03 ljharb

https://github.com/v8/v8/commit/40060be68ca4faf00f526c5e581148e1141f489d is the bug fix; there may not be any way to synchronously detect it.

ljharb avatar Mar 09 '19 06:03 ljharb