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

Unified Diff: src/extensions/i18n/i18n-utils.js

Issue 18075004: Mark i18n functions as native and set proper names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « src/extensions/i18n/footer.js ('k') | src/extensions/i18n/number-format.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/i18n-utils.js
diff --git a/src/extensions/i18n/i18n-utils.js b/src/extensions/i18n/i18n-utils.js
index c15a7d3fbda93cbf5d3ac55f70c6a3b73a2f6af6..d7e9486c507681c73973fb25e9bb7a39198cfc21 100644
--- a/src/extensions/i18n/i18n-utils.js
+++ b/src/extensions/i18n/i18n-utils.js
@@ -73,13 +73,17 @@ function addBoundMethod(obj, methodName, implementation, length) {
}
}
}
+ %FunctionSetName(boundMethod, internalName);
%FunctionRemovePrototype(boundMethod);
+ %SetNativeFlag(boundMethod);
this[internalName] = boundMethod;
}
return this[internalName];
}
+ %FunctionSetName(getter, methodName);
%FunctionRemovePrototype(getter);
+ %SetNativeFlag(getter);
Object.defineProperty(obj.prototype, methodName, {
get: getter,
@@ -185,7 +189,7 @@ function getGetOption(options, caller) {
'Default options are missing.');
}
- function getOption(property, type, values, defaultValue) {
+ var getOption = function getOption(property, type, values, defaultValue) {
if (options[property] !== undefined) {
var value = options[property];
switch (type) {
@@ -362,11 +366,11 @@ function toObject(value) {
function setOptions(inOptions, extensionMap, keyValues, getOption, outOptions) {
var extension = '';
- function updateExtension(key, value) {
+ var updateExtension = function updateExtension(key, value) {
return '-' + key + '-' + String(value);
}
- function updateProperty(property, type, value) {
+ var updateProperty = function updateProperty(property, type, value) {
if (type === 'boolean' && (typeof value === 'string')) {
value = (value === 'true') ? true : false;
}
« no previous file with comments | « src/extensions/i18n/footer.js ('k') | src/extensions/i18n/number-format.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698