Skip to content

src: make realm binding data store weak

src: remove aliased buffer weak callback An AliasedBuffer can be nested in a BaseObject and their weak callbacks invoke order are not guaranteed. Prevent aliased buffer from being accessed in its weak callback as its validness can be checked with the emptiness of the persistent handle.

src: make realm binding data store weak The binding data must be weak so that it won't keep the realm reachable from strong GC roots indefinitely. The wrapper object of binding data should be referenced from JavaScript, thus the binding data should be reachable throughout the lifetime of the realm.

Fixes https://github.com/nodejs/node/issues/47353

Merge request reports

Loading