Consider exposing weakrefs and finalisers to JS.
Categories
(Core :: JavaScript: GC, enhancement, P3)
Tracking
()
People
(Reporter: pbone, Unassigned)
Details
(Keywords: triage-deferred)
Attachments
(1 file)
|
3.62 KB,
application/x-javascript
|
Details |
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Updated•8 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 7•6 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8] from comment #6)
Are you still working on this?
Comment 8•6 years ago
|
||
I'm not, other things came up and I de-prioritized this. Please steal it :)
Comment 9•6 years ago
•
|
||
Based on a surface reading of the specification, and the existence of JS files in js/src/builtin, I decided to take a first pass at what this might look like, with a dependency on XPConnect's Components.
I'm not claiming this is anywhere near correct, nor that it should be implemented in JavaScript. Think of this as a starting point for bootstrapping an implementation, if Mozilla developers consider that desirable. Note this is completely untested!!
Comment 10•6 years ago
|
||
FYI, I have an experimental implementation of the weakrefs proposal for SpiderMonkey in my shim. It's based on nondeterministicGetWeakMapKeys and a backing-off interval check for finding empty cells in FinalizationGroups.
I'd be happy to adapt the code to XPConnect's Components, I just don't have enough knowledge of Firefox or a dev environment setup for it.
https://github.com/mhofman/tc39-weakrefs-shim/tree/spec-update/src/spidermonkey
PS: I have an overdue update pending to update the shim to the latest version of the spec, clean some things up and improve the documentation.
Comment 11•6 years ago
|
||
Possible duplicate: bug 1561074.
It's pretty obvious to me now that nobody's going to take a .js file to implement WeakRef or FinalizationGroup. That was just a bad idea on my part.
| Reporter | ||
Comment 12•6 years ago
|
||
I'm going to close this in favour of Bug 1561074.
Description
•