mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155081 - Part 3: Replace ThrowError with ThrowTypeError in Generator.js. r=till
This commit is contained in:
parent
e1a230ef1a
commit
9ea1ea9f8c
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user