Make TypedArray.from and TypedArray.of writable and configurable
BUG=v8:4315 R=adamk LOG=Y Review URL: https://codereview.chromium.org/1734223004 Cr-Commit-Position: refs/heads/master@{#34310}
This commit is contained in:
parent
4461af8f79
commit
60eb0fdf61
@ -785,7 +785,7 @@ function TypedArray() {
|
|||||||
%FunctionSetPrototype(TypedArray, new GlobalObject());
|
%FunctionSetPrototype(TypedArray, new GlobalObject());
|
||||||
%AddNamedProperty(TypedArray.prototype,
|
%AddNamedProperty(TypedArray.prototype,
|
||||||
"constructor", TypedArray, DONT_ENUM);
|
"constructor", TypedArray, DONT_ENUM);
|
||||||
utils.InstallFunctions(TypedArray, DONT_ENUM | DONT_DELETE | READ_ONLY, [
|
utils.InstallFunctions(TypedArray, DONT_ENUM, [
|
||||||
"from", TypedArrayFrom,
|
"from", TypedArrayFrom,
|
||||||
"of", TypedArrayOf
|
"of", TypedArrayOf
|
||||||
]);
|
]);
|
||||||
|
@ -115,9 +115,9 @@ function TestTypedArrayOf(constructor) {
|
|||||||
// Check superficial features of %TypedArray%.of.
|
// Check superficial features of %TypedArray%.of.
|
||||||
var desc = Object.getOwnPropertyDescriptor(constructor.__proto__, "of");
|
var desc = Object.getOwnPropertyDescriptor(constructor.__proto__, "of");
|
||||||
|
|
||||||
assertEquals(desc.configurable, false);
|
assertEquals(desc.configurable, true);
|
||||||
assertEquals(desc.enumerable, false);
|
assertEquals(desc.enumerable, false);
|
||||||
assertEquals(desc.writable, false);
|
assertEquals(desc.writable, true);
|
||||||
assertEquals(constructor.of.length, 0);
|
assertEquals(constructor.of.length, 0);
|
||||||
|
|
||||||
// %TypedArray%.of is not a constructor.
|
// %TypedArray%.of is not a constructor.
|
||||||
|
Loading…
Reference in New Issue
Block a user