diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2018-02-21 17:49:47 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-02-22 18:17:23 +0300 |
commit | ffab6cd5057bce6dbbcbe06b0eaa0f905aa43115 (patch) | |
tree | 3001ab4075d4d26247136a30540c87255118794b /src/async_wrap.cc | |
parent | 070a82e82c917492bf306e546cef55ffb3ca8359 (diff) |
src: fix abort when taking a heap snapshot
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: https://github.com/nodejs/node/pull/18898
Fixes: https://github.com/nodejs/node/issues/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>
Diffstat (limited to 'src/async_wrap.cc')
-rw-r--r-- | src/async_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/async_wrap.cc b/src/async_wrap.cc index a7eed82958c..08bb73f7468 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -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); } |