Index: src/generator.js |
diff --git a/src/generator.js b/src/generator.js |
index 484afd8d6a51f62292ed178c3c5973c53d1dc134..031d56e37e3612bdb98f0a3822e24c500093f427 100644 |
--- a/src/generator.js |
+++ b/src/generator.js |
@@ -16,8 +16,8 @@ |
function GeneratorObjectNext(value) { |
if (!IS_GENERATOR(this)) { |
- throw MakeTypeError(kIncompatibleMethodReceiver, |
- '[Generator].prototype.next', this); |
+ throw MakeTypeError('incompatible_method_receiver', |
+ ['[Generator].prototype.next', this]); |
} |
var continuation = %GeneratorGetContinuation(this); |
@@ -35,14 +35,14 @@ |
return { value: void 0, done: true }; |
} else { |
// Generator is running. |
- throw MakeTypeError(kGeneratorRunning); |
+ throw MakeTypeError('generator_running', []); |
} |
} |
function GeneratorObjectThrow(exn) { |
if (!IS_GENERATOR(this)) { |
- throw MakeTypeError(kIncompatibleMethodReceiver, |
- '[Generator].prototype.throw', this); |
+ throw MakeTypeError('incompatible_method_receiver', |
+ ['[Generator].prototype.throw', this]); |
} |
var continuation = %GeneratorGetContinuation(this); |
@@ -59,7 +59,7 @@ |
throw exn; |
} else { |
// Generator is running. |
- throw MakeTypeError(kGeneratorRunning); |
+ throw MakeTypeError('generator_running', []); |
} |
} |