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

Unified Diff: src/v8natives.js

Issue 1093183006: [es6] Map/Set size getter should have "get size" name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: NameToFunctionName might allocate now so we need to be careful about execution order 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
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 8080e12753df3bb8ac7b9b585d36028fc094d94b..1570ab670b5506885f809ccaf82f0a376f2a9487 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -46,7 +46,8 @@ function InstallGetter(object, name, getter, attributes) {
if (typeof attributes == "undefined") {
attributes = DONT_ENUM;
}
- %FunctionSetName(getter, name);
+ %FunctionSetName(getter, "get " +
+ (IS_SYMBOL(name) ? "[" + %SymbolDescription(name) + "]" : name));
%FunctionRemovePrototype(getter);
%DefineAccessorPropertyUnchecked(object, name, getter, null, attributes);
%SetNativeFlag(getter);
@@ -55,8 +56,10 @@ function InstallGetter(object, name, getter, attributes) {
// Helper function to install a getter/setter accessor property.
function InstallGetterSetter(object, name, getter, setter) {
- %FunctionSetName(getter, name);
- %FunctionSetName(setter, name);
+ var functionName =
+ IS_SYMBOL(name) ? "[" + %SymbolDescription(name) + "]" : name;
+ %FunctionSetName(getter, "get " + functionName);
+ %FunctionSetName(setter, "set " + functionName);
%FunctionRemovePrototype(getter);
%FunctionRemovePrototype(setter);
%DefineAccessorPropertyUnchecked(object, name, getter, setter, DONT_ENUM);

Powered by Google App Engine
This is Rietveld 408576698