| Index: src/generator.js
|
| diff --git a/src/generator.js b/src/generator.js
|
| index c152e3a6eea369d4c4306bb946df2d5edeeed29e..1ca3fd434d6cb6ba4afeeada4d7b9d1885acdab6 100644
|
| --- a/src/generator.js
|
| +++ b/src/generator.js
|
| @@ -43,7 +43,9 @@ function GeneratorFunctionConstructor(arg1) { // length == 1
|
| var global_receiver = %GlobalReceiver(global);
|
| // Compile the string in the constructor and not a helper so that errors
|
| // appear to come from here.
|
| - var f = %_CallFunction(global_receiver, %CompileString(source, true));
|
| + var f = %CompileString(source, true);
|
| + if (!IS_FUNCTION(f)) return f;
|
| + f = %_CallFunction(global_receiver, f);
|
| %FunctionMarkNameShouldPrintAsAnonymous(f);
|
| return f;
|
| }
|
|
|