Closed
Bug 1277801
Opened 8 years ago
Closed 5 years ago
Remove Object.prototype.toString classname fallback
Categories
(Core :: JavaScript: Standard Library, task, P3)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla78
People
(Reporter: evilpie, Assigned: evilpie)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files, 1 obsolete file)
We should stop looking at the JSClass' name in Object.prototype.toString.
Assignee | ||
Comment 1•8 years ago
|
||
After we fix that we can remove the hack where we set the name to js_Object_str.
Updated•7 years ago
|
status-firefox60:
--- → affected
Priority: -- → P3
Comment 2•7 years ago
|
||
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)
Updated•7 years ago
|
Attachment #8981299 -
Flags: review?(evilpies)
Comment 3•7 years ago
|
||
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).
Updated•5 years ago
|
Type: defect → task
Keywords: site-compat
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → evilpies
Assignee | ||
Updated•5 years ago
|
Attachment #8981299 -
Attachment is obsolete: true
Assignee | ||
Comment 5•5 years ago
|
||
Similar to a patch by Robin Templeton <robin@igalia.com>
Assignee | ||
Comment 6•5 years ago
|
||
There are still some failures that I hadn't noticed before: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3b44a549e404b0ebb44b875a358e69d85bfa4fe3
Assignee | ||
Comment 7•5 years ago
|
||
test_xrayToJS.xhtml uses the fact that we used to get [object Opaque]
for objects that are non-xrayable and thus get the OpaqueXrayTraits
class. I don't see anything obvious to replace this check with.
Assignee | ||
Comment 8•5 years ago
|
||
With the following changes Object.prototype.toString is not using the JSClass' name
anymore. This means we now fail to detect opaque wrappers, because they just get the default string: [object Object]
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/14459cfd1c7a
Introduce Cu.isOpaqueWrapper. r=peterv
https://hg.mozilla.org/integration/autoland/rev/e4b9d51c588d
Remove Object.prototype.toString classname fallback. r=jwalden
Comment 10•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/14459cfd1c7a
https://hg.mozilla.org/mozilla-central/rev/e4b9d51c588d
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox78:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Updated•5 years ago
|
Updated•4 years ago
|
Keywords: site-compat
You need to log in
before you can comment on or make changes to this bug.
Description
•