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

Unified Diff: src/weak-collection.js

Issue 1140053002: Migrate error messages, part 11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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') | 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 f9863c1b208f9a7c93adb6a96124db444ee93da4..4211baa669b0fbf64f1b713cfd86d0dd90d02504 100644
--- a/src/weak-collection.js
+++ b/src/weak-collection.js
@@ -52,9 +52,7 @@ function WeakMapSet(key, value) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakMap.prototype.set', this);
}
- if (!IS_SPEC_OBJECT(key)) {
- throw %MakeTypeError('invalid_weakmap_key', [this, key]);
- }
+ if (!IS_SPEC_OBJECT(key)) throw MakeTypeError(kInvalidWeakMapKey);
return %WeakCollectionSet(this, key, value);
}
@@ -124,9 +122,7 @@ function WeakSetAdd(value) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'WeakSet.prototype.add', this);
}
- if (!IS_SPEC_OBJECT(value)) {
- throw %MakeTypeError('invalid_weakset_value', [this, value]);
- }
+ if (!IS_SPEC_OBJECT(value)) throw MakeTypeError(kInvalidWeakSetValue);
return %WeakCollectionSet(this, value, true);
}
« no previous file with comments | « src/symbol.js ('k') | test/mjsunit/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698