{WeakSet, WeakMap}.prototype should be an ordinary object

RESOLVED FIXED in Firefox 40

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: evilpie, Assigned: evilpie)

Tracking

(Blocks 1 bug, {dev-doc-complete})

unspecified
mozilla40
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox40 fixed)

Details

()

Attachments

(1 attachment, 1 obsolete attachment)

WeakSet.prototype is just an ordinary object.
Summary: WeakSet.prototype should be an object → {WeakSet, WeakMap}.prototype should be an ordinary object
Posted patch plain-proto (obsolete) — Splinter Review
Assignee: nobody → evilpies
Status: NEW → ASSIGNED
Attachment #8539694 - Flags: review?(jwalden+bmo)
Attachment #8539694 - Flags: review?(jwalden+bmo) → review+
Apparently there are some tests in dom/ for weakmaps?! https://treeherder.mozilla.org/#/jobs?repo=try&revision=d92ca6857564 The test is not wrong, but we don't yet have WeakMap.prototype.@@toStringTag.
Depends on: 1114580
No longer depends on: WeakSet
Dup of bug 656828, except:
- 656828 also changes Map and Debugger
- patches in 656828 are most likely out of date.
Attachment #8539694 - Attachment is obsolete: true
Attachment #8600686 - Flags: review?(jwalden+bmo)
Blocks: 797686
No longer blocks: es6
Comment on attachment 8600686 [details] [diff] [review]
Make WeakMap/Set.prototype a plain object

Review of attachment 8600686 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/imptests/failures/html/js/builtins/test_WeakMap.prototype-properties.html.json
@@ +3,5 @@
>    "WeakMap.prototype.delete.length": true,
>    "WeakMap.prototype.get.length": true,
>    "WeakMap.prototype.has.length": true,
> +  "WeakMap.prototype.set.length": true,
> +  "WeakMap.prototype.@@toStringTag": true

...it's really necessary to *opt IN* to every test you want to run, and not to opt *out* of every test you fail?  Sadfaces.
Attachment #8600686 - Flags: review?(jwalden+bmo) → review+
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #5)
> Comment on attachment 8600686 [details] [diff] [review]
> Make WeakMap/Set.prototype a plain object
> 
> Review of attachment 8600686 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> :::
> dom/imptests/failures/html/js/builtins/test_WeakMap.prototype-properties.
> html.json
> @@ +3,5 @@
> >    "WeakMap.prototype.delete.length": true,
> >    "WeakMap.prototype.get.length": true,
> >    "WeakMap.prototype.has.length": true,
> > +  "WeakMap.prototype.set.length": true,
> > +  "WeakMap.prototype.@@toStringTag": true
> 
> ...it's really necessary to *opt IN* to every test you want to run, and not
> to opt *out* of every test you fail?  Sadfaces.
Well actually that's all the tests that are known to fail. I think all of the "length" tests fail, because we changed the property to be configurable. @@toStringTag fails now, because Object.toString.call(WeakMap.prototype) would return "[object WeakMap] if we had @@toStringTag.
https://hg.mozilla.org/mozilla-central/rev/0536b35fa2fa
https://hg.mozilla.org/mozilla-central/rev/352218aee262
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Keywords: dev-doc-needed
Duplicate of this bug: 656828
You need to log in before you can comment on or make changes to this bug.