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

Unified Diff: src/json.js

Issue 1123353004: Revert of Wrap runtime.js in a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/i18n.js ('k') | src/macros.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json.js
diff --git a/src/json.js b/src/json.js
index f20106ab69b9d8170fd5200ca17767bc7b56257d..26948fc6ba7b27cf95c2d36bc861b963ba312e4c 100644
--- a/src/json.js
+++ b/src/json.js
@@ -154,10 +154,10 @@
if (IS_ARRAY(value)) {
return SerializeArray(value, replacer, stack, indent, gap);
} else if (IS_NUMBER_WRAPPER(value)) {
- value = $toNumber(value);
+ value = ToNumber(value);
return JSON_NUMBER_TO_STRING(value);
} else if (IS_STRING_WRAPPER(value)) {
- return %QuoteJSONString($toString(value));
+ return %QuoteJSONString(ToString(value));
} else if (IS_BOOLEAN_WRAPPER(value)) {
return %_ValueOf(value) ? "true" : "false";
} else {
@@ -176,14 +176,14 @@
if (IS_OBJECT(space)) {
// Unwrap 'space' if it is wrapped
if (IS_NUMBER_WRAPPER(space)) {
- space = $toNumber(space);
+ space = ToNumber(space);
} else if (IS_STRING_WRAPPER(space)) {
- space = $toString(space);
+ space = ToString(space);
}
}
var gap;
if (IS_NUMBER(space)) {
- space = $max(0, $min($toInteger(space), 10));
+ space = $max(0, $min(ToInteger(space), 10));
gap = %_SubString(" ", 0, space);
} else if (IS_STRING(space)) {
if (space.length > 10) {
@@ -203,9 +203,9 @@
for (var i = 0; i < length; i++) {
var item = replacer[i];
if (IS_STRING_WRAPPER(item)) {
- item = $toString(item);
+ item = ToString(item);
} else {
- if (IS_NUMBER_WRAPPER(item)) item = $toNumber(item);
+ if (IS_NUMBER_WRAPPER(item)) item = ToNumber(item);
if (IS_NUMBER(item)) item = %_NumberToString(item);
}
if (IS_STRING(item) && seen_properties[item] != seen_sentinel) {
« no previous file with comments | « src/i18n.js ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698