Closed Bug 1083047 Opened 10 years ago Closed 10 years ago

Update ToPropertyKey to accept Symbol wrapper objects

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: 446240525, Assigned: 446240525)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])

Attachments

(1 file)

js> assertEq({[Object(Symbol.for("foo"))]:1}[Symbol.for("foo")], 1)
typein:29:0 Error: Assertion failed: got (void 0), expected 1
Attachment #8505460 - Flags: review?(jorendorff)
Comment on attachment 8505460 [details] [diff] [review]
bug-1083047.patch

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

Nice. Thanks.
Attachment #8505460 - Flags: review?(jorendorff) → review+
It's probably the case, but did we check that all the JITs totally refuse to do anything for getelem/setelem/etc. if given an object, such that the fallback slow-path will properly unbox Symbol objects into primitives and Do The Right Thing?
https://hg.mozilla.org/mozilla-central/rev/baa57b576dd6
https://hg.mozilla.org/mozilla-central/rev/6dd9100871c1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.