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

Unified Diff: src/i18n.js

Issue 1285133009: Native context: do not hold onto helper functions on the utils object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.js
diff --git a/src/i18n.js b/src/i18n.js
index cac267aa61778a335e1c3b39b5464e507e97260f..5fd32c8b407fd7335051f4f76fdc486d9ffd9e60 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -28,7 +28,6 @@ var GlobalRegExp = global.RegExp;
var GlobalString = global.String;
var MathFloor;
var RegExpTest;
-var SetFunctionName = utils.SetFunctionName;
var StringIndexOf;
var StringLastIndexOf;
var StringMatch;
@@ -221,7 +220,7 @@ function addBoundMethod(obj, methodName, implementation, length) {
}
}
}
- SetFunctionName(boundMethod, internalName);
+ %FunctionSetName(boundMethod, internalName);
%FunctionRemovePrototype(boundMethod);
%SetNativeFlag(boundMethod);
this[internalName] = boundMethod;
@@ -229,7 +228,7 @@ function addBoundMethod(obj, methodName, implementation, length) {
return this[internalName];
}
- SetFunctionName(getter, methodName);
+ %FunctionSetName(getter, methodName);
%FunctionRemovePrototype(getter);
%SetNativeFlag(getter);
@@ -988,7 +987,7 @@ function initializeCollator(collator, locales, options) {
},
DONT_ENUM
);
-SetFunctionName(Intl.Collator.prototype.resolvedOptions, 'resolvedOptions');
+%FunctionSetName(Intl.Collator.prototype.resolvedOptions, 'resolvedOptions');
%FunctionRemovePrototype(Intl.Collator.prototype.resolvedOptions);
%SetNativeFlag(Intl.Collator.prototype.resolvedOptions);
@@ -1008,7 +1007,7 @@ SetFunctionName(Intl.Collator.prototype.resolvedOptions, 'resolvedOptions');
},
DONT_ENUM
);
-SetFunctionName(Intl.Collator.supportedLocalesOf, 'supportedLocalesOf');
+%FunctionSetName(Intl.Collator.supportedLocalesOf, 'supportedLocalesOf');
%FunctionRemovePrototype(Intl.Collator.supportedLocalesOf);
%SetNativeFlag(Intl.Collator.supportedLocalesOf);
@@ -1247,7 +1246,8 @@ function initializeNumberFormat(numberFormat, locales, options) {
},
DONT_ENUM
);
-SetFunctionName(Intl.NumberFormat.prototype.resolvedOptions, 'resolvedOptions');
+%FunctionSetName(Intl.NumberFormat.prototype.resolvedOptions,
+ 'resolvedOptions');
%FunctionRemovePrototype(Intl.NumberFormat.prototype.resolvedOptions);
%SetNativeFlag(Intl.NumberFormat.prototype.resolvedOptions);
@@ -1267,7 +1267,7 @@ SetFunctionName(Intl.NumberFormat.prototype.resolvedOptions, 'resolvedOptions');
},
DONT_ENUM
);
-SetFunctionName(Intl.NumberFormat.supportedLocalesOf, 'supportedLocalesOf');
+%FunctionSetName(Intl.NumberFormat.supportedLocalesOf, 'supportedLocalesOf');
%FunctionRemovePrototype(Intl.NumberFormat.supportedLocalesOf);
%SetNativeFlag(Intl.NumberFormat.supportedLocalesOf);
@@ -1668,8 +1668,8 @@ function initializeDateTimeFormat(dateFormat, locales, options) {
},
DONT_ENUM
);
-SetFunctionName(Intl.DateTimeFormat.prototype.resolvedOptions,
- 'resolvedOptions');
+%FunctionSetName(Intl.DateTimeFormat.prototype.resolvedOptions,
+ 'resolvedOptions');
%FunctionRemovePrototype(Intl.DateTimeFormat.prototype.resolvedOptions);
%SetNativeFlag(Intl.DateTimeFormat.prototype.resolvedOptions);
@@ -1689,7 +1689,7 @@ SetFunctionName(Intl.DateTimeFormat.prototype.resolvedOptions,
},
DONT_ENUM
);
-SetFunctionName(Intl.DateTimeFormat.supportedLocalesOf, 'supportedLocalesOf');
+%FunctionSetName(Intl.DateTimeFormat.supportedLocalesOf, 'supportedLocalesOf');
%FunctionRemovePrototype(Intl.DateTimeFormat.supportedLocalesOf);
%SetNativeFlag(Intl.DateTimeFormat.supportedLocalesOf);
@@ -1847,8 +1847,8 @@ function initializeBreakIterator(iterator, locales, options) {
},
DONT_ENUM
);
-SetFunctionName(Intl.v8BreakIterator.prototype.resolvedOptions,
- 'resolvedOptions');
+%FunctionSetName(Intl.v8BreakIterator.prototype.resolvedOptions,
+ 'resolvedOptions');
%FunctionRemovePrototype(Intl.v8BreakIterator.prototype.resolvedOptions);
%SetNativeFlag(Intl.v8BreakIterator.prototype.resolvedOptions);
@@ -1869,7 +1869,7 @@ SetFunctionName(Intl.v8BreakIterator.prototype.resolvedOptions,
},
DONT_ENUM
);
-SetFunctionName(Intl.v8BreakIterator.supportedLocalesOf, 'supportedLocalesOf');
+%FunctionSetName(Intl.v8BreakIterator.supportedLocalesOf, 'supportedLocalesOf');
%FunctionRemovePrototype(Intl.v8BreakIterator.supportedLocalesOf);
%SetNativeFlag(Intl.v8BreakIterator.supportedLocalesOf);
@@ -1965,7 +1965,7 @@ function OverrideFunction(object, name, f) {
writeable: true,
configurable: true,
enumerable: false });
- SetFunctionName(f, name);
+ %FunctionSetName(f, name);
%FunctionRemovePrototype(f);
%SetNativeFlag(f);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698