Closed Bug 1424160 Opened 8 years ago Closed 7 years ago

Update class strings for IDL iterator objects and prototypes

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: TimothyGu, Assigned: bzbarsky)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.70 Safari/537.36 Steps to reproduce: Execute the following steps in the console: const it = new URLSearchParams().keys(); console.log(Object.prototype.toString.call(it)); console.log(Object.prototype.toString.call(Object.getPrototypeOf(it))); console.log(Object.getPrototypeOf(it)[Symbol.toStringTag); Actual results: The following is printed [object URLSearchParamsIterator] [object URLSearchParamsIteratorPrototype] undefined Expected results: After https://github.com/heycam/webidl/pull/483: [object URLSearchParams Iterator] [object URLSearchParams Iterator] URLSearchParams Iterator
With a typo in the original description fixed: const it = new URLSearchParams().keys(); console.log(Object.prototype.toString.call(it)); console.log(Object.prototype.toString.call(Object.getPrototypeOf(it))); console.log(Object.getPrototypeOf(it)[Symbol.toStringTag]);
Priority: -- → P3
We want to have some class names with spaces in them, but everything assumes that an interface identifier is in fact an identifier (e.g. uses it in C++ identifiers like namespace names).
Attachment #8976366 - Flags: review?(kyle)
Assignee: nobody → bzbarsky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8976366 - Flags: review?(kyle) → review+
Attachment #8976367 - Flags: review?(kyle) → review+
Attachment #8976368 - Flags: review?(kyle) → review+
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/973e3a16f6dc part 1. Allow interfaces the have a different name for SpiderMonkey class name purposes. r=qdot https://hg.mozilla.org/integration/mozilla-inbound/rev/b0d319aaafbe part 2. Add infrastructure for defining @@toStringTag on Web IDL prototypes. r=qdot https://hg.mozilla.org/integration/mozilla-inbound/rev/e5e68461d391 part 3. Set up @@toStringTag on our synthesized iterator interfaces. r=qdot
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Component: DOM → DOM: Bindings (WebIDL)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: