Bug 1155081 - Part 3: Replace ThrowError with ThrowTypeError in Generator.js. r=till

This commit is contained in:
Tooru Fujisawa 2015-04-20 13:58:16 +09:00
parent e1a230ef1a
commit 9ea1ea9f8c

View File

@ -15,7 +15,7 @@ function StarGeneratorNext(val) {
return { value: undefined, done: true };
if (GeneratorIsRunning(this))
ThrowError(JSMSG_NESTING_GENERATOR);
ThrowTypeError(JSMSG_NESTING_GENERATOR);
}
try {
@ -36,7 +36,7 @@ function StarGeneratorThrow(val) {
throw val;
if (GeneratorIsRunning(this))
ThrowError(JSMSG_NESTING_GENERATOR);
ThrowTypeError(JSMSG_NESTING_GENERATOR);
}
try {
@ -57,7 +57,7 @@ function StarGeneratorReturn(val) {
return { value: val, done: true };
if (GeneratorIsRunning(this))
ThrowError(JSMSG_NESTING_GENERATOR);
ThrowTypeError(JSMSG_NESTING_GENERATOR);
}
try {
@ -78,7 +78,7 @@ function LegacyGeneratorNext(val) {
ThrowStopIteration();
if (GeneratorIsRunning(this))
ThrowError(JSMSG_NESTING_GENERATOR);
ThrowTypeError(JSMSG_NESTING_GENERATOR);
try {
return resumeGenerator(this, val, 'next');
@ -97,7 +97,7 @@ function LegacyGeneratorThrow(val) {
throw val;
if (GeneratorIsRunning(this))
ThrowError(JSMSG_NESTING_GENERATOR);
ThrowTypeError(JSMSG_NESTING_GENERATOR);
try {
return resumeGenerator(this, val, 'throw');
@ -115,7 +115,7 @@ function LegacyGeneratorCloseInternal() {
assert(!LegacyGeneratorObjectIsClosed(this), "Already closed: " + ToString(this));
if (GeneratorIsRunning(this))
ThrowError(JSMSG_NESTING_GENERATOR);
ThrowTypeError(JSMSG_NESTING_GENERATOR);
resumeGenerator(this, undefined, 'close');
if (!LegacyGeneratorObjectIsClosed(this))