Commit f218d94a authored by Trevor Norris's avatar Trevor Norris
Browse files

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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment