Closed
Bug 1178932
Opened 9 years ago
Closed 9 years ago
Implement ES6 Reflect.construct
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: jorendorff, Assigned: jorendorff)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])
Attachments
(1 file, 2 obsolete files)
12.21 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jorendorff
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Eric, would this help you test super()? If so, steal reviews in bug 987514 and bug 1170307 and I'll land it today.
Flags: needinfo?(efaustbmo)
Comment 3•9 years ago
|
||
Hmm. I think that even though this is useful for "recreating the same circumstances", we should still test super() in its native habitat. It's definitely a good tool for reducing crashes and doing manual translation to remove boilerplate, but I would feel weird reading "super()" tests based on R.c. That being said, it would be cool to have, so I might steal the reviews anyways.
Flags: needinfo?(efaustbmo)
Updated•9 years ago
|
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8634531 -
Flags: review?(efaustbmo)
Assignee | ||
Updated•9 years ago
|
Attachment #8627837 -
Attachment is obsolete: true
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8634534 -
Flags: review?(efaustbmo)
Assignee | ||
Updated•9 years ago
|
Attachment #8634531 -
Attachment is obsolete: true
Attachment #8634531 -
Flags: review?(efaustbmo)
Comment 6•9 years ago
|
||
Comment on attachment 8634534 [details] [diff] [review] Implement Reflect.construct Review of attachment 8634534 [details] [diff] [review]: ----------------------------------------------------------------- Take it if you want it, to land earlier (even in post-time-readiness). ::: js/src/tests/ecma_6/Reflect/argumentsList.js @@ +49,3 @@ > > // argumentList.length can be more than func.length. > function testMoar(a) { Lulz, you actually did rename it. :-D ::: js/src/tests/ecma_6/Reflect/construct.js @@ +22,5 @@ > +// JS functions: > +function f(x) { this.x = x; } > +assertDeepEq(Reflect.construct(f, [3]), new f(3)); > +f.prototype = Array.prototype; > +assertDeepEq(Reflect.construct(f, [3]), new f(3)); Also assert inequality of the old |new f(3)| and the new |new f(3)|'s prototypes? Or their equality to the initial f.prototype and to Array.prototype respectively. @@ +26,5 @@ > +assertDeepEq(Reflect.construct(f, [3]), new f(3)); > + > +// Bound functions: > +var bound = f.bind(null, "carrot"); > +assertDeepEq(Reflect.construct(bound, []), new bound); Also assert deep equality with new f("carrot")? @@ +54,5 @@ > + > + assertDeepEq(Reflect.construct(Base, []), new Base); > + //assertDeepEq(Reflect.construct(Derived, [7]), new Derived(7)); > + //g = Derived.bind(null, "q"); > + //assertDeepEq(Reflect.construct(g, [8, 9]), new g(8, 9)); Compare against new Derived("q", 8, 9) as well? @@ +96,5 @@ > + assertEq(new.target, expected); > + expected = undefined; > +} > +var expected = checkNewTarget; > +Reflect.construct(checkNewTarget, []); assertEq(expected, undefined) as verification, as below?
Attachment #8634534 -
Flags: review+
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8634534 [details] [diff] [review] Implement Reflect.construct Thanks, Jeff!
Attachment #8634534 -
Flags: review?(efaustbmo)
Assignee | ||
Comment 8•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e673cc171604
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e673cc171604
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Comment 10•9 years ago
|
||
Documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/construct See also bug 987514 comment 38.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•