Chromium Code Reviews| Index: src/js/generator.js |
| diff --git a/src/js/generator.js b/src/js/generator.js |
| index 6240f7ad3f0aa288f4e9f3fcf73a670a3e32df2f..d4262dcc88c6c48e264b5cbfdf976f10897c01b5 100644 |
| --- a/src/js/generator.js |
| +++ b/src/js/generator.js |
| @@ -84,9 +84,10 @@ function GeneratorFunctionConstructor(arg1) { // length == 1 |
| var global_proxy = %GlobalProxy(GeneratorFunctionConstructor); |
| // 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; |
| + var func = %_CallFunction(global_proxy, %CompileString(source, true)); |
| + // Set name-should-print-as-anonymous flag on the SFI and ensure that |
|
Toon Verwaest
2015/10/30 10:58:01
write out SFI
Igor Sheludko
2015/10/30 11:08:57
Done.
|
| + // |func| uses correct initial map from |new.target| if it's available. |
| + return %CompleteFunctionConstruction(func, GeneratorFunction, new.target); |
| } |
| // ---------------------------------------------------------------------------- |