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

Unified Diff: src/json.js

Issue 1065863003: Use array literals instead of array constructor in native javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase and fix Created 5 years, 8 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/math.js » ('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 90ffa25131d6a2b79d9dbfd0f77fc5c100e6d318..2d40f7b5578534c204785f5d4fc6c6a33bb9a67c 100644
--- a/src/json.js
+++ b/src/json.js
@@ -49,7 +49,7 @@ function JSONParse(text, reviver) {
function SerializeArray(value, replacer, stack, indent, gap) {
if (!%PushIfAbsent(stack, value)) {
- throw MakeTypeError('circular_structure', $Array());
+ throw MakeTypeError('circular_structure', []);
}
var stepback = indent;
indent += gap;
@@ -79,7 +79,7 @@ function SerializeArray(value, replacer, stack, indent, gap) {
function SerializeObject(value, replacer, stack, indent, gap) {
if (!%PushIfAbsent(stack, value)) {
- throw MakeTypeError('circular_structure', $Array());
+ throw MakeTypeError('circular_structure', []);
}
var stepback = indent;
indent += gap;
@@ -223,10 +223,10 @@ function SetUpJSON() {
%AddNamedProperty($JSON, symbolToStringTag, "JSON", READ_ONLY | DONT_ENUM);
// Set up non-enumerable properties of the JSON object.
- InstallFunctions($JSON, DONT_ENUM, $Array(
+ InstallFunctions($JSON, DONT_ENUM, [
"parse", JSONParse,
"stringify", JSONStringify
- ));
+ ]);
}
SetUpJSON();
« no previous file with comments | « src/harmony-typedarray.js ('k') | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698