Commit f2747ed9 authored by machenbach's avatar machenbach Committed by Commit bot

Revert of [es6] Bound function names (patchset #1 id:1 of...

Revert of [es6] Bound function names (patchset #1 id:1 of https://codereview.chromium.org/1182513002/)

Reason for revert:
[Sheriff] Speculative revert for changing layout tests:
https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Linux_32/379/layout-test-results/results.html

Exact blame assignment is not possible as our blink bots were in a bad state for a few builds.

Original issue's description:
> [es6] Bound function names
>
> https://people.mozilla.org/~jorendorff/es6-draft.html#sec-function.prototype.bind
>
> Bound functions should have a name based on the function that was
> bound.
>
> BUG=N
> LOG=N
> R=adamk   CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/4e2a673881c55a13124dd62f2d05c8d9fe233cd3
> Cr-Commit-Position: refs/heads/master@{#28968}

TBR=adamk@chromium.org,arv@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=N

Review URL: https://codereview.chromium.org/1186463002

Cr-Commit-Position: refs/heads/master@{#28981}
parent 888b4eca
......@@ -21,7 +21,6 @@ var GlobalFunction = global.Function;
var GlobalNumber = global.Number;
var GlobalObject = global.Object;
var InternalArray = utils.InternalArray;
var SetFunctionName = utils.SetFunctionName;
var MathAbs;
var ProxyDelegateCallAndConstruct;
......@@ -1765,10 +1764,6 @@ 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");
// 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
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function f() {}
var fb = f.bind({});
assertEquals('bound f', fb.name);
assertEquals('function bound f() { [native code] }', fb.toString());
Object.defineProperty(f, 'name', {value: 42});
var fb2 = f.bind({});
assertEquals('bound ', fb2.name);
assertEquals('function bound () { [native code] }', fb2.toString());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment