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