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

Unified Diff: src/i18n.js

Issue 1302533002: Native context: debug.js does not load from js builtins object anymore. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make importing requirement more explicit Created 5 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/harmony-typedarray.js ('k') | src/json.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.js
diff --git a/src/i18n.js b/src/i18n.js
index 2b8ba90c278ff2e6572505382627eab83c029de1..cac267aa61778a335e1c3b39b5464e507e97260f 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -17,21 +17,18 @@
// -------------------------------------------------------------------
// Imports
+var ArrayIndexOf;
+var ArrayJoin;
+var IsFinite;
+var IsNaN;
var GlobalBoolean = global.Boolean;
var GlobalDate = global.Date;
var GlobalNumber = global.Number;
var GlobalRegExp = global.RegExp;
var GlobalString = global.String;
-var ObjectDefineProperties = utils.ObjectDefineProperties;
-var ObjectDefineProperty = utils.ObjectDefineProperty;
-var SetFunctionName = utils.SetFunctionName;
-
-var ArrayIndexOf;
-var ArrayJoin;
-var IsFinite;
-var IsNaN;
var MathFloor;
var RegExpTest;
+var SetFunctionName = utils.SetFunctionName;
var StringIndexOf;
var StringLastIndexOf;
var StringMatch;
@@ -54,6 +51,12 @@ utils.Import(function(from) {
StringSplit = from.StringSplit;
StringSubstr = from.StringSubstr;
StringSubstring = from.StringSubstring;
+ ToNumber = from.ToNumber;
+});
+
+utils.ImportNow(function(from) {
+ ObjectDefineProperties = from.ObjectDefineProperties;
+ ObjectDefineProperty = from.ObjectDefineProperty;
});
// -------------------------------------------------------------------
@@ -1276,7 +1279,7 @@ SetFunctionName(Intl.NumberFormat.supportedLocalesOf, 'supportedLocalesOf');
*/
function formatNumber(formatter, value) {
// Spec treats -0 and +0 as 0.
- var number = $toNumber(value) + 0;
+ var number = ToNumber(value) + 0;
return %InternalNumberFormat(%GetImplFromInitializedIntlObject(formatter),
number);
@@ -1701,7 +1704,7 @@ function formatDate(formatter, dateValue) {
if (IS_UNDEFINED(dateValue)) {
dateMs = %DateCurrentTime();
} else {
- dateMs = $toNumber(dateValue);
+ dateMs = ToNumber(dateValue);
}
if (!IsFinite(dateMs)) throw MakeRangeError(kDateRange);
« no previous file with comments | « src/harmony-typedarray.js ('k') | src/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698