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

Unified Diff: src/weak-collection.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/v8natives.js ('k') | test/mjsunit/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/weak-collection.js
diff --git a/src/weak-collection.js b/src/weak-collection.js
index 6e11f8073acea69b0182ca5905ae1c9186c2b44a..233f9783841ffa9c39a46b6037f52a0d7e319cd7 100644
--- a/src/weak-collection.js
+++ b/src/weak-collection.js
@@ -25,7 +25,7 @@
if (!IS_NULL_OR_UNDEFINED(iterable)) {
var adder = this.set;
if (!IS_SPEC_FUNCTION(adder)) {
- throw MakeTypeError(kPropertyNotFunction, 'set', this);
+ throw MakeTypeError(kPropertyNotFunction, ['set', this]);
}
for (var nextItem of iterable) {
if (!IS_SPEC_OBJECT(nextItem)) {
@@ -39,8 +39,8 @@
function WeakMapGet(key) {
if (!IS_WEAKMAP(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'WeakMap.prototype.get', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['WeakMap.prototype.get', this]);
}
if (!IS_SPEC_OBJECT(key)) return UNDEFINED;
return %WeakCollectionGet(this, key);
@@ -49,8 +49,8 @@
function WeakMapSet(key, value) {
if (!IS_WEAKMAP(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'WeakMap.prototype.set', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['WeakMap.prototype.set', this]);
}
if (!IS_SPEC_OBJECT(key)) {
throw %MakeTypeError('invalid_weakmap_key', [this, key]);
@@ -61,8 +61,8 @@
function WeakMapHas(key) {
if (!IS_WEAKMAP(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'WeakMap.prototype.has', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['WeakMap.prototype.has', this]);
}
if (!IS_SPEC_OBJECT(key)) return false;
return %WeakCollectionHas(this, key);
@@ -71,8 +71,8 @@
function WeakMapDelete(key) {
if (!IS_WEAKMAP(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'WeakMap.prototype.delete', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['WeakMap.prototype.delete', this]);
}
if (!IS_SPEC_OBJECT(key)) return false;
return %WeakCollectionDelete(this, key);
@@ -116,7 +116,7 @@
if (!IS_NULL_OR_UNDEFINED(iterable)) {
var adder = this.add;
if (!IS_SPEC_FUNCTION(adder)) {
- throw MakeTypeError(kPropertyNotFunction, 'add', this);
+ throw MakeTypeError(kPropertyNotFunction, ['add', this]);
}
for (var value of iterable) {
%_CallFunction(this, value, adder);
@@ -127,8 +127,8 @@
function WeakSetAdd(value) {
if (!IS_WEAKSET(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'WeakSet.prototype.add', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['WeakSet.prototype.add', this]);
}
if (!IS_SPEC_OBJECT(value)) {
throw %MakeTypeError('invalid_weakset_value', [this, value]);
@@ -139,8 +139,8 @@
function WeakSetHas(value) {
if (!IS_WEAKSET(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'WeakSet.prototype.has', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['WeakSet.prototype.has', this]);
}
if (!IS_SPEC_OBJECT(value)) return false;
return %WeakCollectionHas(this, value);
@@ -149,8 +149,8 @@
function WeakSetDelete(value) {
if (!IS_WEAKSET(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'WeakSet.prototype.delete', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['WeakSet.prototype.delete', this]);
}
if (!IS_SPEC_OBJECT(value)) return false;
return %WeakCollectionDelete(this, value);
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698