Skip to content

Commit

Permalink
src: fix abort when taking a heap snapshot
Browse files Browse the repository at this point in the history
Remove an erroneous CHECK that asserted the persistent object's internal
field pointer still pointed to a valid object.  If ClearWrap() has been
called, the field pointer equals nullptr and that is expected behavior.

PR-URL: #18898
Fixes: #18256
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
  • Loading branch information
bnoordhuis authored and BridgeAR committed Feb 22, 2018
1 parent 070a82e commit ffab6cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/async_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ RetainedObjectInfo* WrapperInfo(uint16_t class_id, Local<Value> wrapper) {
CHECK_GT(object->InternalFieldCount(), 0);

AsyncWrap* wrap = Unwrap<AsyncWrap>(object);
CHECK_NE(nullptr, wrap);
if (wrap == nullptr) return nullptr; // ClearWrap() already called.

return new RetainedAsyncInfo(class_id, wrap);
}
Expand Down

0 comments on commit ffab6cd

Please sign in to comment.