Closed Bug 1688198 Opened 3 years ago Closed 3 years ago

Symbol.toStringTag is incorrectly defined on the global object, rather than on its prototype

Categories

(Core :: DOM: Bindings (WebIDL), defect, P3)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox84 --- wontfix
firefox85 --- wontfix
firefox86 --- wontfix
firefox90 --- fixed

People

(Reporter: e7358d9c, Assigned: peterv)

References

Details

Attachments

(2 files)

Attached file testcase.html

This was discovered while working on wpt#27239.


The Symbol.toStringTag property is always supposed to be on the interface prototype object, because the class string is specified for the prototype, regardless of whether the interface is a global object.

Summary: Symbol.toStringTag is defined on the global object, rather than on its prototype → Symbol.toStringTag is incorrectly defined on the global object, rather than on its prototype
Severity: -- → S3
Priority: -- → P3

For [Global] WebIDL interfaces, properties from the property array are installed
on the object itself, instead of on the prototype. To fix the bug I changed how
we install the @@toStringTag property, instead of adding it in the property
array of every interface we'll now instead install the property directly in
CreateInterfaceObject, which is also a codesize win. This does mean that we need
to look up the value dynamically in XrayResolveOwnProperty (we can't resolve it
from the property array anymore), but luckily we can use
NamesOfInterfacesWithProtos for that.

Assignee: nobody → peterv
Status: NEW → ASSIGNED
Pushed by pvanderbeken@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3cc5c27ee349
Symbol.toStringTag is incorrectly defined on the global object, rather than on its prototype. r=edgar.
See Also: → 1710032
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: