On Sun, Jan 22, 2012 at 10:28 AM, David Bruant <[email protected]> wrote: > Hi, > > In Firefox Aurora as well as in Chromium 18, running the following > ----- > var wm = new WeakMap(); > var o = {}; > > Object.preventExtensions(wm); > > wm.set(o, 1); > console.log(wm.get(o)); // 1 > ----- > > Is this something that is wanted? > Same question for Maps and Sets.
Calling set() on a WeakMap doesn't add any properties to the WeakMap object, so yes, it's expected that preventExtensions has no effect. ~TJ _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

