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 addaleax committed Feb 26, 2018
1 parent 01398b2 commit 6e7aa3d
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 @@ -128,7 +128,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 6e7aa3d

Please sign in to comment.