WeakMap and primitive keys

2012-11-01 Thread Nathan Wall
Looking at the recent draft, I noticed that the WeakMap methods accept primitive keys, converting them to objects, and acting like an object was passed in. This differs from the current behavior of Chrome and Firefox, which both throw if key is not an object. It seems, as the current draft

Re: WeakMap and primitive keys

2012-11-01 Thread Allen Wirfs-Brock
copy/paste bug!! Allen On Nov 1, 2012, at 9:05 AM, Nathan Wall wrote: Looking at the recent draft, I noticed that the WeakMap methods accept primitive keys, converting them to objects, and acting like an object was passed in. This differs from the current behavior of Chrome and Firefox

Re: WeakMap and primitive keys

2012-11-01 Thread Brendan Eich
On file? Nathan, thanks for catching this! /be Allen Wirfs-Brock wrote: copy/paste bug!! Allen On Nov 1, 2012, at 9:05 AM, Nathan Wall wrote: Looking at the recent draft, I noticed that the WeakMap methods accept primitive keys, converting them to objects, and acting like an object

Re: WeakMap and primitive keys

2012-11-01 Thread Allen Wirfs-Brock
methods accept primitive keys, converting them to objects, and acting like an object was passed in. This differs from the current behavior of Chrome and Firefox, which both throw if key is not an object. It seems, as the current draft reads, passing in a primitive will fail silently, since