Set inferred name of bound function to empty string.

Otherwise it's whatever the js minifier assigns it to.

R=jkummerow@chromium.org
BUG=chromium:484077
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28190}
This commit is contained in:
yangguo 2015-05-04 02:55:41 -07:00 committed by Commit bot
parent d09e119bc4
commit f42544b768
2 changed files with 8 additions and 0 deletions

View File

@ -407,6 +407,7 @@ RUNTIME_FUNCTION(Runtime_FunctionBindArguments) {
// TODO(lrn): Create bound function in C++ code from premade shared info.
bound_function->shared()->set_bound(true);
bound_function->shared()->set_inferred_name(isolate->heap()->empty_string());
// Get all arguments of calling function (Function.prototype.bind).
int argc = 0;
SmartArrayPointer<Handle<Object> > arguments =

View File

@ -0,0 +1,7 @@
// 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.
// Flags: --allow-natives-syntax
assertEquals("", %FunctionGetInferredName((function(){}).bind({})));