V8's API does not allow calling directly back into V8 from weak callbacks, see: `
|
// calls may be called in the first callback. Should additional work be |
Instead, a second pass callback should be set using the WeakCallbackInfo API.
Affected are tests using this testing API:
|
napi_call_function(env, undefined, js_cb, 0, NULL, NULL)); |
This should fire a DCHECK for allowed allocations as soon as the JS callback executed non-trivial JS.
It also breaks the assumption that V8 can call out to the callback during the GC when not all pointers (of other v8::Persistent handles) have not been updated.
@hashseed
V8's API does not allow calling directly back into V8 from weak callbacks, see: `
node/deps/v8/include/v8.h
Line 540 in 938e118
Instead, a second pass callback should be set using the WeakCallbackInfo API.
Affected are tests using this testing API:
node/test/js-native-api/test_general/test_general.c
Line 234 in 938e118
This should fire a DCHECK for allowed allocations as soon as the JS callback executed non-trivial JS.
It also breaks the assumption that V8 can call out to the callback during the GC when not all pointers (of other v8::Persistent handles) have not been updated.
@hashseed