Closed
Bug 1092538
Opened 9 years ago
Closed 9 years ago
Ignore `null` iterable in Map, Set, WeakMap and WeakSet constructors
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: anba, Assigned: arai)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])
Attachments
(1 file)
7.37 KB,
patch
|
evilpie
:
review+
|
Details | Diff | Splinter Review |
`null` iterable argument has to be ignored. Simple tests: --- new Map(null); new Set(null); new WeakMap(null); // but see bug 1092537 new WeakSet(null); --- Expected: No TypeError thrown Actual: TypeError thrown for Map, Set and WeakSet
Reporter | ||
Comment 1•9 years ago
|
||
Ignoring `null` in addition to `undefined` was added in ES6 draft rev14.
Updated•9 years ago
|
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Assignee | ||
Comment 2•9 years ago
|
||
Green on try run: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=32181e6fa6c0
Attachment #8530324 -
Flags: review?(evilpies)
Comment 3•9 years ago
|
||
Comment on attachment 8530324 [details] [diff] [review] Ignore `null` iterable in Map, Set, WeakMap and WeakSet constructors. Review of attachment 8530324 [details] [diff] [review]: ----------------------------------------------------------------- Thanks :) ::: js/src/builtin/MapObject.cpp @@ -1235,5 @@ > if (!obj) > return false; > > CallArgs args = CallArgsFromVp(argc, vp); > - if (args.hasDefined(0)) { please change all of these to !args.get(0).isNullOrUndefined()
Attachment #8530324 -
Flags: review?(evilpies) → review+
Assignee | ||
Comment 4•9 years ago
|
||
thank you for reviewing :D Changed those lines and pushed to m-i: https://hg.mozilla.org/integration/mozilla-inbound/rev/187125e5da10
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/187125e5da10
Assignee: nobody → arai_a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Assignee | ||
Comment 6•9 years ago
|
||
Updated following documents: https://developer.mozilla.org/en-US/Firefox/Releases/37 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla "Site Compatibility for Firefox 37" will be updated after Firefox 37 becomes Aurora.
Comment 8•9 years ago
|
||
Added to the compat doc: https://developer.mozilla.org/en-US/Firefox/Releases/37/Site_Compatibility
You need to log in
before you can comment on or make changes to this bug.
Description
•