Closed Bug 1206584 Opened 10 years ago Closed 10 years ago

make WeakSet/WeakMap Object.observe()'able

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: coroutines, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36 Steps to reproduce: (feature request?/proposal?) Actual results: (in my head this went splendidly) Expected results: I have a feature request/proposal for Javascript in Firefox. I'm not sure if I'm filing this properly, there are a lot of projects and I ahd trouble navigating bugzilla? Anyway. WeakSets and WeakMaps can't be Object.observe()'d - I wish this were possible so I could provide finalizers. I want to call a function when something is collected. WeakSet/Map are the only source of weak references we have - I can't see any other way provide callbacks for broken weak references. This might be a proposal for ES7. I'm probably in the wrong place.
Severity: normal → enhancement
> This might be a proposal for ES7. I'm probably in the wrong place. Indeed. You want to mail es-discuss@mozilla.org with spec proposals for ES. But note that there is quite a bit of discussion there in the past about whether it's OK to expose finalizers, even the post-mortem kind you presumably want here, and people are pretty wary of exposing it. This is why WeakSets/WeakMaps can't be enumerated, for example... This bug as filed is wontfix, since Object.observe is not happening. See https://mail.mozilla.org/pipermail/es-discuss/2015-November/044684.html
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.