Closed
Bug 1084001
Opened 11 years ago
Closed 11 years ago
Promise.name is an empty string, it should be "Promise"
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: marco, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
3.00 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
I think this is a regression because I remember testing it when fixing bug 1028987. I'm not entirely sure though.
Comment 2•11 years ago
|
||
This has more to do with how the bindings set up the "function" Promise.
Component: JavaScript Engine → DOM
| Assignee | ||
Comment 3•11 years ago
|
||
This is similar to https://www.w3.org/Bugs/Public/show_bug.cgi?id=22392 but not identical. Needs a Web IDL spec issue, I believe; right now per web IDL interface objects do not have .name.
Then again, I see nothing in ES6 that says that Promise should have a .name either, though I could be missing it.
| Assignee | ||
Updated•11 years ago
|
Blocks: ParisBindings
| Assignee | ||
Comment 4•11 years ago
|
||
Ah, here's the relevant es6 bit, courtesy of Tom:
Every built-in Function object, including constructors, that is not identified as an
anonymous function has a name property whose value is a String. Unless otherwise
specified, this value is the name that is given to the function in this specification.
We should just align both our impl and Web IDL with this.
| Assignee | ||
Comment 5•11 years ago
|
||
And:
Unless otherwise specified, the name property of a built-in Function object, if it
exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
| Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8506376 -
Flags: review?(peterv)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
| Assignee | ||
Comment 7•11 years ago
|
||
Oh, and a note: The JSPROP_PERMANENT went away to align with the ES6 spec. Spidermonkey has outstanding bugs to do so too.
| Assignee | ||
Comment 8•11 years ago
|
||
And another note: evilpie suggested maybe interning instead of copying here, since we'll atomize anyway when we go to define on the global.
Comment 9•11 years ago
|
||
Comment on attachment 8506376 [details] [diff] [review]
Set the .name of DOM interface objects to the name of the interface
Review of attachment 8506376 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/BindingUtils.cpp
@@ +464,5 @@
> + return nullptr;
> + }
> +
> + JS::Rooted<JSString*> nameStr(cx,
> + JS_NewStringCopyZ(cx, name));
Yeah, interning seems fine.
Attachment #8506376 -
Flags: review?(peterv) → review+
| Assignee | ||
Comment 10•11 years ago
|
||
Did the interning and filed/fixed https://www.w3.org/Bugs/Public/show_bug.cgi?id=27170 on the spec.
https://hg.mozilla.org/integration/mozilla-inbound/rev/35582d2331a8
Flags: in-testsuite+
Target Milestone: --- → mozilla36
| Assignee | ||
Comment 11•11 years ago
|
||
And https://hg.mozilla.org/integration/mozilla-inbound/rev/4506af8e95fd to back out the JSPROP_PERMANENT change, because imptests are silly.
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1089079 to track doing that.
Comment 12•11 years ago
|
||
Fixed as far as I can tell
https://hg.mozilla.org/mozilla-central/rev/35582d2331a8
https://hg.mozilla.org/mozilla-central/rev/4506af8e95fd
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•