mozilla / rhino

Rhino is an open-source implementation of JavaScript written entirely in Java
https://rhino.github.io
Other
4.17k stars 846 forks source link

Support ES2021 WeakRef & FinalizationRegistry #943

Open p-bakker opened 3 years ago

p-bakker commented 3 years ago

WeakRef, for referring to a target object without preserving it from garbage collection FinalizationRegistry, to manage registration and unregistration of cleanup operations performed when target objects are garbage collected

Proposal: https://github.com/tc39/proposal-weakrefs MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef

tonygermano commented 3 years ago

Is there any reason this couldn't just be a thin wrapper around java.lang.ref.WeakReference?

p-bakker commented 3 years ago

I haven't looked into the details, but I think/hope it would be just that

On Fri, Jul 2, 2021, 9:19 PM tonygermano @.***> wrote:

Is there any reason this couldn't just be a thin wrapper around java.lang.ref.WeakReference?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mozilla/rhino/issues/943#issuecomment-873212085, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGADHLRYHNKGFM6LO7KMDLTVYGNNANCNFSM47FGCXUQ .