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

Unified Diff: src/extensions/i18n/locale.js

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 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 | « src/extensions/i18n/locale.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/locale.js
diff --git a/src/extensions/i18n/locale.js b/src/extensions/i18n/locale.js
index e4783277e64a63285251cf9215ea6c66bc86efec..ea95b87192e9f6adb74e36e3a769e45bfd7cdf10 100644
--- a/src/extensions/i18n/locale.js
+++ b/src/extensions/i18n/locale.js
@@ -34,6 +34,8 @@
* Canonicalizes the language tag, or throws in case the tag is invalid.
*/
function canonicalizeLanguageTag(localeID) {
+ native function NativeJSCanonicalizeLanguageTag();
+
// null is typeof 'object' so we have to do extra check.
if (typeof localeID !== 'string' && typeof localeID !== 'object' ||
localeID === null) {
@@ -50,7 +52,7 @@ function canonicalizeLanguageTag(localeID) {
// ICU bug filled - http://bugs.icu-project.org/trac/ticket/9265.
// TODO(cira): check if -u-kn-true-kc-true-kh-true still throws after
// upgrade to ICU 4.9.
- var tag = %CanonicalizeLanguageTag(localeString);
+ var tag = NativeJSCanonicalizeLanguageTag(localeString);
if (tag === 'invalid-tag') {
throw new RangeError('Invalid language tag: ' + localeString);
}
« no previous file with comments | « src/extensions/i18n/locale.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698