Reviewers: Jakob,

Description:
Set inferred name of bound function to empty string.

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

[email protected]
BUG=chromium:484077
LOG=N

Please review this at https://codereview.chromium.org/1122733002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+2, -3 lines):
  M src/runtime/runtime-function.cc
  A + test/mjsunit/regress/regress-crbug-484077.js


Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc index e0be0698fec13998728c920eb0d390b1e2fbec7b..b86d969dd9ed4b8fa54fefc896b40a7b68e2aa81 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -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 =
Index: test/mjsunit/regress/regress-crbug-484077.js
diff --git a/test/mjsunit/regress/regress-450895.js b/test/mjsunit/regress/regress-crbug-484077.js
similarity index 74%
copy from test/mjsunit/regress/regress-450895.js
copy to test/mjsunit/regress/regress-crbug-484077.js
index 48aa00d956c6f84fdcfe2e02cfc286c0f07180ba..26fa7a2d43a39f8864726b75eee94eee6a1891c4 100644
--- a/test/mjsunit/regress/regress-450895.js
+++ b/test/mjsunit/regress/regress-crbug-484077.js
@@ -4,6 +4,4 @@

 // Flags: --allow-natives-syntax

-var v = new Array();
-Object.freeze(v);
-v = v.concat(0.5);
+assertEquals("", %FunctionGetInferredName((function(){}).bind({})));


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to