Closed Bug 814965 Opened 12 years ago Closed 9 years ago

WeakMap's GetKeyArg should use ToObject

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Ms2ger, Unassigned)

Details

The spec states

> Let k be ToObject(key).
>
> ReturnIfAbrupt(k).

<http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.15.5>

whereas we throw for any primitive value.
It seems like rev 12 changes this to throw when !key.isObject(), but only in set(). All others seem to silently ignore the argument instead.
Sounds like a spec bug to me.
Assignee: general → nobody
ToObject(key) was a spec bug; WeakMap implementation was updated to conform to the latest spec draft in bug 1127827. Resolving as invalid.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.