Files
node/lib
Anna Henningsen 30b0339061 src: use symbol to store AsyncWrap resource
Use a symbol on the bindings object to store the public resource object,
rather than a `v8::Global` Persistent. This has several advantages:

- It’s harder to inadvertently create memory leaks this way.
  The garbage collector sees the `AsyncWrap` →  resource link like
  a regular JS property, and can collect the objects as a group,
  even if the resource object should happen to point back to the
  `AsyncWrap` object.
- This will make it easier in the future to use `owner_symbol` for
  this purpose, which is generally the direction we should be moving
  the `async_hooks` API into (i.e. using more public objects instead
  of letting internal wires stick out).

PR-URL: https://github.com/nodejs/node/pull/31745
Backport-PR-URL: https://github.com/nodejs/node/pull/33962
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2020-06-26 23:48:40 +01:00
..
2020-02-06 02:49:31 +00:00
2020-06-08 19:32:23 -07:00
2020-06-07 09:51:59 -07:00
2020-04-28 16:14:55 +02:00
2018-11-20 10:42:31 -08:00
2020-02-06 02:49:21 +00:00
2020-04-28 16:00:49 +02:00
2020-05-13 17:52:56 +02:00
2020-04-28 16:00:36 +02:00
2020-05-13 17:52:54 +02:00
2020-04-28 16:19:44 +02:00
2020-02-06 02:49:21 +00:00