Index: src/typedarray.js |
diff --git a/src/typedarray.js b/src/typedarray.js |
index ab5fc5c9e37f707c028286e42c74b4628f83bfa1..c149b35b98e8926094ae7054b977bc29aed2ee10 100644 |
--- a/src/typedarray.js |
+++ b/src/typedarray.js |
@@ -299,13 +299,13 @@ macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE) |
%SetCode(global.NAME, NAMEConstructor); |
%FunctionSetPrototype(global.NAME, new $Object()); |
- %AddProperty(global.NAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
- READ_ONLY | DONT_ENUM | DONT_DELETE); |
- %AddProperty(global.NAME.prototype, |
- "constructor", global.NAME, DONT_ENUM); |
- %AddProperty(global.NAME.prototype, |
- "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
- READ_ONLY | DONT_ENUM | DONT_DELETE); |
+ %AddNamedProperty(global.NAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
+ READ_ONLY | DONT_ENUM | DONT_DELETE); |
+ %AddNamedProperty(global.NAME.prototype, |
+ "constructor", global.NAME, DONT_ENUM); |
+ %AddNamedProperty(global.NAME.prototype, |
+ "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
+ READ_ONLY | DONT_ENUM | DONT_DELETE); |
InstallGetter(global.NAME.prototype, "buffer", NAME_GetBuffer); |
InstallGetter(global.NAME.prototype, "byteOffset", NAME_GetByteOffset); |
InstallGetter(global.NAME.prototype, "byteLength", NAME_GetByteLength); |
@@ -436,7 +436,7 @@ function SetupDataView() { |
%FunctionSetPrototype($DataView, new $Object); |
// Set up constructor property on the DataView prototype. |
- %AddProperty($DataView.prototype, "constructor", $DataView, DONT_ENUM); |
+ %AddNamedProperty($DataView.prototype, "constructor", $DataView, DONT_ENUM); |
InstallGetter($DataView.prototype, "buffer", DataViewGetBufferJS); |
InstallGetter($DataView.prototype, "byteOffset", DataViewGetByteOffset); |