| Index: src/typedarray.js
|
| diff --git a/src/typedarray.js b/src/typedarray.js
|
| index 4e3b9385863a20c94234d3dc63bafb31191e31f1..2086fc3a820911f5d15d3438be1aeca1e5b83181 100644
|
| --- a/src/typedarray.js
|
| +++ b/src/typedarray.js
|
| @@ -119,28 +119,32 @@
|
|
|
| function NAME_GetBuffer() {
|
| if (!(%_ClassOf(this) === 'NAME')) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver, "NAME.buffer", this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ["NAME.buffer", this]);
|
| }
|
| return %TypedArrayGetBuffer(this);
|
| }
|
|
|
| function NAME_GetByteLength() {
|
| if (!(%_ClassOf(this) === 'NAME')) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver, "NAME.byteLength", this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ["NAME.byteLength", this]);
|
| }
|
| return %_ArrayBufferViewGetByteLength(this);
|
| }
|
|
|
| function NAME_GetByteOffset() {
|
| if (!(%_ClassOf(this) === 'NAME')) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver, "NAME.byteOffset", this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ["NAME.byteOffset", this]);
|
| }
|
| return %_ArrayBufferViewGetByteOffset(this);
|
| }
|
|
|
| function NAME_GetLength() {
|
| if (!(%_ClassOf(this) === 'NAME')) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver, "NAME.length", this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ["NAME.length", this]);
|
| }
|
| return %_TypedArrayGetLength(this);
|
| }
|
| @@ -149,7 +153,8 @@
|
|
|
| function NAMESubArray(begin, end) {
|
| if (!(%_ClassOf(this) === 'NAME')) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver, "NAME.subarray", this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ["NAME.subarray", this]);
|
| }
|
| var beginInt = TO_INTEGER(begin);
|
| if (!IS_UNDEFINED(end)) {
|
| @@ -361,23 +366,24 @@
|
|
|
| function DataViewGetBufferJS() {
|
| if (!IS_DATAVIEW(this)) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver, 'DataView.buffer', this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ['DataView.buffer', this]);
|
| }
|
| return %DataViewGetBuffer(this);
|
| }
|
|
|
| function DataViewGetByteOffset() {
|
| if (!IS_DATAVIEW(this)) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver,
|
| - 'DataView.byteOffset', this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ['DataView.byteOffset', this]);
|
| }
|
| return %_ArrayBufferViewGetByteOffset(this);
|
| }
|
|
|
| function DataViewGetByteLength() {
|
| if (!IS_DATAVIEW(this)) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver,
|
| - 'DataView.byteLength', this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ['DataView.byteLength', this]);
|
| }
|
| return %_ArrayBufferViewGetByteLength(this);
|
| }
|
| @@ -401,8 +407,8 @@
|
| macro DATA_VIEW_GETTER_SETTER(TYPENAME)
|
| function DataViewGetTYPENAMEJS(offset, little_endian) {
|
| if (!IS_DATAVIEW(this)) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver,
|
| - 'DataView.getTYPENAME', this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ['DataView.getTYPENAME', this]);
|
| }
|
| if (%_ArgumentsLength() < 1) {
|
| throw MakeTypeError('invalid_argument');
|
| @@ -414,8 +420,8 @@
|
|
|
| function DataViewSetTYPENAMEJS(offset, value, little_endian) {
|
| if (!IS_DATAVIEW(this)) {
|
| - throw MakeTypeError(kIncompatibleMethodReceiver,
|
| - 'DataView.setTYPENAME', this);
|
| + throw MakeTypeError('incompatible_method_receiver',
|
| + ['DataView.setTYPENAME', this]);
|
| }
|
| if (%_ArgumentsLength() < 2) {
|
| throw MakeTypeError('invalid_argument');
|
|
|