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

Unified Diff: src/extensions/i18n/date-format.js

Issue 22411003: Move i18n extension's date-format C++ code to runtime (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase 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/date-format.cc ('k') | src/extensions/i18n/i18n-extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/date-format.js
diff --git a/src/extensions/i18n/date-format.js b/src/extensions/i18n/date-format.js
index 04e7a7c7b9d34e50c4ec34bf2ec1e3966534c0b6..b1d28e535cd0010a2b523df8c4cb54da631c20c4 100644
--- a/src/extensions/i18n/date-format.js
+++ b/src/extensions/i18n/date-format.js
@@ -235,7 +235,6 @@ function toDateTimeOptions(options, required, defaults) {
* Useful for subclassing.
*/
function initializeDateTimeFormat(dateFormat, locales, options) {
- native function NativeJSCreateDateTimeFormat();
if (dateFormat.hasOwnProperty('__initializedIntlObject')) {
throw new TypeError('Trying to re-initialize DateTimeFormat object.');
@@ -292,7 +291,7 @@ function initializeDateTimeFormat(dateFormat, locales, options) {
year: {writable: true}
});
- var formatter = NativeJSCreateDateTimeFormat(
+ var formatter = %CreateDateTimeFormat(
requestedLocale, {skeleton: ldmlString, timeZone: tz}, resolved);
if (tz !== undefined && tz !== resolved.timeZone) {
@@ -409,8 +408,6 @@ function initializeDateTimeFormat(dateFormat, locales, options) {
* DateTimeFormat.
*/
function formatDate(formatter, dateValue) {
- native function NativeJSInternalDateFormat();
-
var dateMs;
if (dateValue === undefined) {
dateMs = Date.now();
@@ -422,7 +419,7 @@ function formatDate(formatter, dateValue) {
throw new RangeError('Provided date is not in valid range.');
}
- return NativeJSInternalDateFormat(formatter.formatter, new Date(dateMs));
+ return %InternalDateFormat(formatter.formatter, new Date(dateMs));
}
@@ -433,8 +430,7 @@ function formatDate(formatter, dateValue) {
* Returns undefined if date string cannot be parsed.
*/
function parseDate(formatter, value) {
- native function NativeJSInternalDateParse();
- return NativeJSInternalDateParse(formatter.formatter, String(value));
+ return %InternalDateParse(formatter.formatter, String(value));
}
« no previous file with comments | « src/extensions/i18n/date-format.cc ('k') | src/extensions/i18n/i18n-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698