Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: src/bootstrapper.cc

Issue 1080393004: [es6] Function.prototype.name should be the empty string (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/es6/function-name-configurable.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index cb9bdfaf4ef26689ea17361175c719043d9be659..62b455f3dad80ed31b9f439a1d3cb76ebf8ead0a 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -501,13 +501,10 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) {
.Assert();
}
- // Allocate the empty function as the prototype for function ECMAScript
- // 262 15.3.4.
- Handle<String> empty_string =
- factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("Empty"));
+ // Allocate the empty function as the prototype for function - ES6 19.2.3
Handle<Code> code(isolate->builtins()->builtin(Builtins::kEmptyFunction));
- Handle<JSFunction> empty_function = factory->NewFunctionWithoutPrototype(
- empty_string, code);
+ Handle<JSFunction> empty_function =
+ factory->NewFunctionWithoutPrototype(factory->empty_string(), code);
// Allocate the function map first and then patch the prototype later
Handle<Map> empty_function_map =
« no previous file with comments | « no previous file | test/mjsunit/es6/function-name-configurable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698