From 4fd6bd1f84970b1703365321a5d51501a0d36b3a Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Mon, 20 Apr 2015 13:58:16 +0900 Subject: [PATCH] Bug 1155081 - Part 3: Replace ThrowError with ThrowTypeError in Generator.js. r=till --- js/src/builtin/Generator.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/src/builtin/Generator.js b/js/src/builtin/Generator.js index 0639455d53ec..b3758c609078 100644 --- a/js/src/builtin/Generator.js +++ b/js/src/builtin/Generator.js @@ -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))