We need to make sure length and name of the %ThrowTypeError% function are
non
configurable and non writable.
I didn't see a test for that but maybe I just missed it?
The length property of a %ThrowTypeError% function has the attributes {
[[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
Also, https://bugs.ecmascript.org/show_bug.cgi?id=4267
https://codereview.chromium.org/1027283004/diff/530001/src/builtins.cc
File src/builtins.cc (right):
https://codereview.chromium.org/1027283004/diff/530001/src/builtins.cc#newcode1019
src/builtins.cc:1019: NewTypeError("strict_poison_pill",
HandleVector<Object>(NULL, 0)));
maybe rename the message key now that we renamed the functions?
https://codereview.chromium.org/1027283004/diff/530001/src/contexts.h
File src/contexts.h (right):
https://codereview.chromium.org/1027283004/diff/530001/src/contexts.h#newcode594
src/contexts.h:594: : is_strict(language_mode) ||
!IsAccessorFunction(kind)
I don't understand why accessor functions are special cased here?
Maybe restructure this code to make it clearer what is going on.
https://codereview.chromium.org/1027283004/diff/530001/test/mjsunit/harmony/classes.js
File test/mjsunit/harmony/classes.js (right):
https://codereview.chromium.org/1027283004/diff/530001/test/mjsunit/harmony/classes.js#newcode923
test/mjsunit/harmony/classes.js:923: (function
testRestrictedPropertiesSloppy() {
Classes are always strict so I'm not sure this adds anything.
https://codereview.chromium.org/1027283004/diff/530001/test/mjsunit/strict-mode.js
File test/mjsunit/strict-mode.js (right):
https://codereview.chromium.org/1027283004/diff/530001/test/mjsunit/strict-mode.js#newcode1027
test/mjsunit/strict-mode.js:1027: assertFalse(d.enumerable);
we need to test name and length too but I'm fine deferring that to a
followup CL.
https://codereview.chromium.org/1027283004/diff/530001/test/webkit/fast/js/Object-getOwnPropertyNames.js
File test/webkit/fast/js/Object-getOwnPropertyNames.js (right):
https://codereview.chromium.org/1027283004/diff/530001/test/webkit/fast/js/Object-getOwnPropertyNames.js#newcode63
test/webkit/fast/js/Object-getOwnPropertyNames.js:63: "parseInt":
"['arguments', 'caller', 'length', 'name']",
How come this still has arguments and caller?
https://codereview.chromium.org/1027283004/diff/530001/test/webkit/fast/js/caller-property-expected.txt
File test/webkit/fast/js/caller-property-expected.txt (right):
https://codereview.chromium.org/1027283004/diff/530001/test/webkit/fast/js/caller-property-expected.txt#newcode33
test/webkit/fast/js/caller-property-expected.txt:33: FAIL
nonStrictCaller(strictCallee) should throw TypeError: Type error. Threw
exception TypeError: 'caller' and 'arguments' are restricted function
properties and cannot be accessed in this context..
Maybe update the test for these?
https://codereview.chromium.org/1027283004/diff/530001/test/webkit/strict-throw-type-error.js
File test/webkit/strict-throw-type-error.js (right):
https://codereview.chromium.org/1027283004/diff/530001/test/webkit/strict-throw-type-error.js#newcode29
test/webkit/strict-throw-type-error.js:29:
Object.getOwnPropertyDescriptor(object, name).get;
This test is broken. getter always returns undefined and undefined ===
undefined :-)
Consider deleting this test.
https://codereview.chromium.org/1027283004/
--
--
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.