bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

WeakMap's GetKeyArg should use ToObject

RESOLVED INVALID

Status

()

Core
JavaScript Engine
RESOLVED INVALID
6 years ago
3 years ago

People

(Reporter: Ms2ger, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
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.
(Reporter)

Comment 1

6 years ago
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.

Comment 2

6 years ago
Sounds like a spec bug to me.
(Assignee)

Updated

4 years ago
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
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.