Revision: 21072
Author: [email protected]
Date: Wed Apr 30 08:16:16 2014 UTC
Log: Remove duplicate ToObject implementaion from i18n.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/255273004
http://code.google.com/p/v8/source/detail?r=21072
Modified:
/branches/bleeding_edge/src/i18n.js
=======================================
--- /branches/bleeding_edge/src/i18n.js Wed Apr 30 07:36:12 2014 UTC
+++ /branches/bleeding_edge/src/i18n.js Wed Apr 30 08:16:16 2014 UTC
@@ -279,7 +279,7 @@
if (options === undefined) {
options = {};
} else {
- options = toObject(options);
+ options = ToObject(options);
}
var matcher = options.localeMatcher;
@@ -510,18 +510,6 @@
return extensionMap;
}
-
-
-/**
- * Converts parameter to an Object if possible.
- */
-function toObject(value) {
- if (IS_NULL_OR_UNDEFINED(value)) {
- throw new $TypeError('Value cannot be converted to an Object.');
- }
-
- return $Object(value);
-}
/**
@@ -752,7 +740,7 @@
return freezeArray(seen);
}
- var o = toObject(locales);
+ var o = ToObject(locales);
// Converts it to UInt32 (>>> is shr on 32bit integers).
var len = o.length >>> 0;
@@ -964,7 +952,7 @@
return new Intl.Collator(locales, options);
}
- return initializeCollator(toObject(this), locales, options);
+ return initializeCollator(ToObject(this), locales, options);
},
DONT_ENUM
);
@@ -1191,7 +1179,7 @@
return new Intl.NumberFormat(locales, options);
}
- return initializeNumberFormat(toObject(this), locales, options);
+ return initializeNumberFormat(ToObject(this), locales, options);
},
DONT_ENUM
);
@@ -1584,7 +1572,7 @@
return new Intl.DateTimeFormat(locales, options);
}
- return initializeDateTimeFormat(toObject(this), locales, options);
+ return initializeDateTimeFormat(ToObject(this), locales, options);
},
DONT_ENUM
);
@@ -1790,7 +1778,7 @@
return new Intl.v8BreakIterator(locales, options);
}
- return initializeBreakIterator(toObject(this), locales, options);
+ return initializeBreakIterator(ToObject(this), locales, options);
},
DONT_ENUM
);
--
--
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.