Closed
Bug 1464758
Opened 7 years ago
Closed 7 years ago
BigInt shouldn't get the legacy fallback behaviour in Object.prototype.toString
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: anba, Assigned: terpri)
References
Details
Attachments
(1 file)
2.77 KB,
patch
|
anba
:
review+
terpri
:
checkin+
|
Details | Diff | Splinter Review |
Test case:
---
delete BigInt.prototype[Symbol.toStringTag];
assertEq(Object.prototype.toString.call(BigInt(0)), "[object Object]");
---
Expected: Test passes
Actual: Object.prototype.toString returns "[object BigInt]"
Comment 1•7 years ago
|
||
I would suggest just changing the name in the JSClass field to "Object". Hopefully bug 1277799 is going to be fixed at some point.
Reporter | ||
Comment 2•7 years ago
|
||
Ugh, I forgot about bug 1277801. In the mean time just remove [1] and [2], because that should be removed in any case.
[1] https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/js/src/builtin/Object.cpp#477-481
[2] https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/js/src/builtin/Object.cpp#541-544
![]() |
Assignee | |
Comment 3•7 years ago
|
||
Change BigInt's class name to "Object" so that the correct tag is used
when the @@toStringTag property is not a string. Remove special cases
for BigInt in GetBuiltinTagFast and GetBuiltinTagSlow.
Attachment #8981537 -
Flags: review?(andrebargull)
Reporter | ||
Comment 4•7 years ago
|
||
Comment on attachment 8981537 [details] [diff] [review]
BigInt shouldn't get the legacy fallback behaviour in Object.prototype.toString.
Review of attachment 8981537 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM!
Attachment #8981537 -
Flags: review?(andrebargull) → review+
![]() |
Assignee | |
Updated•7 years ago
|
Attachment #8981537 -
Flags: checkin+
![]() |
Assignee | |
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fcf6bdd122ad
BigInt shouldn't get the legacy fallback behaviour in Object.prototype.toString. r=anba
Keywords: checkin-needed
![]() |
||
Comment 6•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Updated•7 years ago
|
Assignee: nobody → robin
You need to log in
before you can comment on or make changes to this bug.
Description
•