You should be able to test new.target by doing something like.

function C() {
  this[9] = 1;
}

var o = Reflect.construct(C, [], Array);
assertSame(C.prototype, o.__proto__);
assertSame(10, o.length);



https://codereview.chromium.org/913073003/diff/60001/src/runtime.js
File src/runtime.js (right):

https://codereview.chromium.org/913073003/diff/60001/src/runtime.js#newcode478
src/runtime.js:478: if (length > 0x800000) {
maybe add a const/macro for this?

https://codereview.chromium.org/913073003/diff/60001/test/mjsunit/harmony/reflect-apply.js
File test/mjsunit/harmony/reflect-apply.js (right):

https://codereview.chromium.org/913073003/diff/60001/test/mjsunit/harmony/reflect-apply.js#newcode30
test/mjsunit/harmony/reflect-apply.js:30:
assertInstanceof(Reflect.apply(returnThis, "str", []), String);
Maybe check typeof and Object.getPrototypeOf instead of relying on
instanceof which would pass even if there was an extra object on the
prototype chain.

https://codereview.chromium.org/913073003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to