| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index 425863e5010fd63f3f9240b051e5007cca2450e7..9266af6f0c3243e063b9374fe0853a0b9e20c1d7 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -1665,7 +1665,6 @@ function FunctionSourceString(func) {
|
| func = %GetCallTrap(func);
|
| }
|
|
|
| - // TODO(wingo): Print source using function* for generators.
|
| if (!IS_FUNCTION(func)) {
|
| throw new $TypeError('Function.prototype.toString is not generic');
|
| }
|
| @@ -1684,7 +1683,8 @@ function FunctionSourceString(func) {
|
| var name = %FunctionNameShouldPrintAsAnonymous(func)
|
| ? 'anonymous'
|
| : %FunctionGetName(func);
|
| - return 'function ' + name + source;
|
| + var head = %FunctionIsGenerator(func) ? 'function* ' : 'function ';
|
| + return head + name + source;
|
| }
|
|
|
|
|
|
|