Chromium Code Reviews| Index: src/v8natives.js |
| diff --git a/src/v8natives.js b/src/v8natives.js |
| index 0cc50786f96fb2f5205696d22ef48eee888322f4..b002be3461852c65df3962e01354134d75b35f12 100644 |
| --- a/src/v8natives.js |
| +++ b/src/v8natives.js |
| @@ -21,6 +21,7 @@ var GlobalFunction = global.Function; |
| var GlobalNumber = global.Number; |
| var GlobalObject = global.Object; |
| var InternalArray = utils.InternalArray; |
| +var SetFunctionName = utils.SetFunctionName; |
| var MathAbs; |
| var ProxyDelegateCallAndConstruct; |
| @@ -1764,6 +1765,10 @@ function FunctionBind(this_arg) { // Length is 1. |
| var result = %FunctionBindArguments(boundFunction, this, |
| this_arg, new_length); |
| + var name = this.name; |
| + var bound_name = IS_STRING(name) ? name : ""; |
| + SetFunctionName(result, bound_name, "bound"); |
|
Toon Verwaest
2015/07/06 15:23:00
This does not work since it sets the name on the S
|
| + |
| // We already have caller and arguments properties on functions, |
| // which are non-configurable. It therefore makes no sence to |
| // try to redefine these as defined by the spec. The spec says |