Commit 2cc757f0 authored by Anna Henningsen's avatar Anna Henningsen Committed by Rich Trott
Browse files

src: do not crash when accessing empty WeakRefs

Making `.incRef()` and `.decRef()` fail silently leads to better error
messages when trying to access the underlying value (as opposed to
crashing inside these methods).

Refs: https://github.com/nodejs/node/pull/25461#issuecomment-524481482

PR-URL: https://github.com/nodejs/node/pull/29289


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarGus Caplan <me@gus.host>
parent 0f3aa81e
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