Skip to content

src: do not crash when accessing empty WeakRefs

Rodrigo Muino Tomonari requested to merge github/fork/addaleax/weakref-dns into master

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

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading