A recent V8 change, [4733273: [heap] Disallow JS execution in second pass callbacks.](https://chromium-review.googlesource.com/c/v8/v8/+/4733273), makes a strict change to `WeakCallbackInfo::SetSecondPassCallback`: > The second pass callback is **prohibited from executing JavaScript**. Embedders should schedule another callback in case this is required. This condition is enforced at runtime and results in a crash. This change conflicts with NAN's [weak](https://github.com/nodejs/nan/blob/main/test/js/weak-test.js) [tests](https://github.com/nodejs/nan/blob/main/test/js/weak2-test.js), both written to run JS in the weak callback.
Activity
agracio commentedon Oct 18, 2025
This is resolved in 2.23.0 release.