Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1186)

Unified Diff: src/typedarray.js

Issue 1095573002: Revert of Migrate error messages, part 2. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/symbol.js ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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');
« no previous file with comments | « src/symbol.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698