Commit ebbbc5a7 authored by Ali Ijaz Sheikh's avatar Ali Ijaz Sheikh Committed by Ali Sheikh
Browse files

buffer: replace deprecated SetWeak usage

Old style SetWeak is now deprecated, and weakness now works like
phantom references. This means we no longer have a reference to the
object in the weak callback. We use a kInternalFields style weak
callback which provides us with the contents of 2 internal fields
where we can squirrel away the native buffer pointer.

We can no longer neuter the buffer in the weak callback, but that
should be unnecessary as the object is going to be GC'd during the
current gc cycle.

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


Reviewed-By: default avatarbnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarindutny - Fedor Indutny <fedor.indutny@gmail.com>
parent 34aac23d
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