Index: src/generator.js |
diff --git a/src/generator.js b/src/generator.js |
index b35744a094f29ef0acd8baf3180bdfb7234a9084..5fab8d32c45c627103156b719a5533aa9e03b91d 100644 |
--- a/src/generator.js |
+++ b/src/generator.js |
@@ -44,13 +44,7 @@ function GeneratorFunctionPrototypeConstructor(x) { |
} |
function GeneratorFunctionConstructor(arg1) { // length == 1 |
- var source = NewFunctionString(arguments, 'function*'); |
- 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 = %_CallFunction(global_proxy, %CompileString(source, true)); |
- %FunctionMarkNameShouldPrintAsAnonymous(f); |
- return f; |
+ return NewFunctionFromString(arguments, 'function*'); |
} |