Remove Object.prototype.toString classname fallback

NEW
Unassigned

Status

()

P3
normal
2 years ago
4 months ago

People

(Reporter: evilpie, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox60 affected)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
We should stop looking at the JSClass' name in Object.prototype.toString.
(Reporter)

Updated

2 years ago
Blocks: 694100
(Reporter)

Comment 1

2 years ago
After we fix that we can remove the hack where we set the name to js_Object_str.
status-firefox60: --- → affected
Priority: -- → P3
Created attachment 8981299 [details] [diff] [review]
Remove Object.prototype.toString classname fallback.

Use "[object Object]" as the default builtin tag, and return the builtin
tag if the object doesn't have a string in its @@toStringTag property.
Update tests to check for the standard behavior.
Attachment #8981299 - Flags: review?(evilpies)
Attachment #8981299 - Flags: review?(evilpies)
I overlooked the related bug for DOM objects, so this patch isn't ready yet (it should work for JS primitive types, but it makes toString return "[object Object]" for DOM objects).
You need to log in before you can comment on or make changes to this bug.