Reviewers: adamk,

Description:
Fix attributes of TypedArray properties

Some need to be configurable and are currently non-configurable,
and vice versa.

R=adamk

Please review this at https://codereview.chromium.org/1236033010/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+5, -4 lines):
  M src/typedarray.js


Index: src/typedarray.js
diff --git a/src/typedarray.js b/src/typedarray.js
index ce52cdf15c0b50db12eb9c904fd1781ce30acf26..dec85421b3abb1c8882baea3ea4cda8b85970c0f 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -354,17 +354,18 @@ macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE)
   %AddNamedProperty(GlobalNAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE,
                     READ_ONLY | DONT_ENUM | DONT_DELETE);
   %AddNamedProperty(GlobalNAME.prototype,
-                    "constructor", global.NAME, DONT_ENUM);
+                    "constructor", global.NAME,
+                    READ_ONLY | DONT_ENUM | DONT_DELETE);
   %AddNamedProperty(GlobalNAME.prototype,
                     "BYTES_PER_ELEMENT", ELEMENT_SIZE,
                     READ_ONLY | DONT_ENUM | DONT_DELETE);
   utils.InstallGetter(GlobalNAME.prototype, "buffer", NAME_GetBuffer);
utils.InstallGetter(GlobalNAME.prototype, "byteOffset", NAME_GetByteOffset,
-                      DONT_ENUM | DONT_DELETE);
+                      DONT_ENUM);
utils.InstallGetter(GlobalNAME.prototype, "byteLength", NAME_GetByteLength,
-                      DONT_ENUM | DONT_DELETE);
+                      DONT_ENUM);
   utils.InstallGetter(GlobalNAME.prototype, "length", NAME_GetLength,
-                      DONT_ENUM | DONT_DELETE);
+                      DONT_ENUM);
   utils.InstallGetter(GlobalNAME.prototype, symbolToStringTag,
                       TypedArrayGetToStringTag);
   utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [


--
--
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