handle_wrap: properly don't abort on unwrap
From commit 756ae2c5 all the WRAP/UNWRAP were moved to a single location for ease of use. In a single location NO_ABORT should have been used but wasn't. This caused HandleWrap::Close to abort. Below is the applicable code change as demonstration there was no abort specified when unwrapping the object. void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) { HandleScope scope(node_isolate); - HandleWrap *wrap = static_cast<HandleWrap*>( - args.This()->GetAlignedPointerFromInternalField(0)); + HandleWrap* wrap; + UNWRAP(args.This(), HandleWrap, wrap); Also included a test that will reproduce the abort.
parent
6df4741f
Please register or sign in to comment