Skip to content

weak handles and promises in progress stuff

Important: Please do not discuss the merits of this here. I will make the case for it once it works. This will be put into a new PR once ready. For now, I am only interested in figuring out why this does not work.


I'm not sure where to ask this with the full details, so I guess here will work.

This attempts to make a GC handler for unhandled promise rejections, but currently the weak handle appears to make the promise un-GC-able. I worked with @trevnorris on this and his conclusion was also that it is probably a V8 bug, but I'd like more review on the method.

This problem persists when applied onto the vee-eight-4.9 branch.

Here's the test failure showing it with this patch:

=== release test-promises-unhandled-rejections ===                             
Path: parallel/test-promises-unhandled-rejections
'synchronously rejected promise should trigger unhandledRejection' failed

Error: Async test timeout exceeded
    at null._repeat (/Users/Jeremiah/Documents/node/test/parallel/test-promises-unhandled-rejections.js:58:23)
    at wrapper [as _onTimeout] (timers.js:284:11)
    at Timer.listOnTimeout (timers.js:92:15)
From previous event:
    at asyncTest (/Users/Jeremiah/Documents/node/test/parallel/test-promises-unhandled-rejections.js:45:17)
    at Object.<anonymous> (/Users/Jeremiah/Documents/node/test/parallel/test-promises-unhandled-rejections.js:109:1)
    at Module._compile (module.js:417:34)
    at Object.Module._extensions..js (module.js:426:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:451:10)
    at startup (node.js:153:18)
    at node.js:963:3

cc @nodejs/v8

Merge request reports

Loading