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

Unified Diff: src/generator.js

Issue 1086313003: 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/factory.cc ('k') | src/harmony-array.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/generator.js
diff --git a/src/generator.js b/src/generator.js
index 031d56e37e3612bdb98f0a3822e24c500093f427..484afd8d6a51f62292ed178c3c5973c53d1dc134 100644
--- a/src/generator.js
+++ b/src/generator.js
@@ -16,8 +16,8 @@
function GeneratorObjectNext(value) {
if (!IS_GENERATOR(this)) {
- throw MakeTypeError('incompatible_method_receiver',
- ['[Generator].prototype.next', this]);
+ throw MakeTypeError(kIncompatibleMethodReceiver,
+ '[Generator].prototype.next', this);
}
var continuation = %GeneratorGetContinuation(this);
@@ -35,14 +35,14 @@ function GeneratorObjectNext(value) {
return { value: void 0, done: true };
} else {
// Generator is running.
- throw MakeTypeError('generator_running', []);
+ throw MakeTypeError(kGeneratorRunning);
}
}
function GeneratorObjectThrow(exn) {
if (!IS_GENERATOR(this)) {
- throw MakeTypeError('incompatible_method_receiver',
- ['[Generator].prototype.throw', this]);
+ throw MakeTypeError(kIncompatibleMethodReceiver,
+ '[Generator].prototype.throw', this);
}
var continuation = %GeneratorGetContinuation(this);
@@ -59,7 +59,7 @@ function GeneratorObjectThrow(exn) {
throw exn;
} else {
// Generator is running.
- throw MakeTypeError('generator_running', []);
+ throw MakeTypeError(kGeneratorRunning);
}
}
« no previous file with comments | « src/factory.cc ('k') | src/harmony-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698