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

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

Issue 21499003: Move helper methods from i18n extension into runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/runtime.h » ('j') | src/runtime.cc » ('J')
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 ea95b87192e9f6adb74e36e3a769e45bfd7cdf10..e4783277e64a63285251cf9215ea6c66bc86efec 100644
--- a/src/extensions/i18n/locale.js
+++ b/src/extensions/i18n/locale.js
@@ -34,8 +34,6 @@
* 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) {
@@ -52,7 +50,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 = NativeJSCanonicalizeLanguageTag(localeString);
+ var tag = %CanonicalizeLanguageTag(localeString);
if (tag === 'invalid-tag') {
throw new RangeError('Invalid language tag: ' + localeString);
}
« no previous file with comments | « src/extensions/i18n/locale.cc ('k') | src/runtime.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698