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

Unified Diff: src/js/json.js

Issue 1567963002: [builtins] Migrate Object.keys to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/execution.cc ('k') | src/js/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/json.js
diff --git a/src/js/json.js b/src/js/json.js
index 45c6792fd0d408c7ce7df599024104d7fc3586c7..ee3b9dceea217062f077131c5807b3716352a6e5 100644
--- a/src/js/json.js
+++ b/src/js/json.js
@@ -18,7 +18,6 @@ var MakeTypeError;
var MaxSimple;
var MinSimple;
var ObjectHasOwnProperty;
-var ObjectKeys;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
@@ -26,7 +25,6 @@ utils.Import(function(from) {
MaxSimple = from.MaxSimple;
MinSimple = from.MinSimple;
ObjectHasOwnProperty = from.ObjectHasOwnProperty;
- ObjectKeys = from.ObjectKeys;
});
// -------------------------------------------------------------------
@@ -52,7 +50,7 @@ function InternalizeJSONProperty(holder, name, reviver) {
}
}
} else {
- for (var p of ObjectKeys(val)) {
+ for (var p of %object_keys(val)) {
var newElement = InternalizeJSONProperty(val, p, reviver);
if (IS_UNDEFINED(newElement)) {
%reflect_delete_property(val, p);
@@ -123,7 +121,7 @@ function SerializeObject(value, replacer, stack, indent, gap) {
}
}
} else {
- for (var p of ObjectKeys(value)) {
+ for (var p of %object_keys(value)) {
var strP = JSONSerialize(p, value, replacer, stack, indent, gap);
if (!IS_UNDEFINED(strP)) {
var member = %QuoteJSONString(p) + ":";
« no previous file with comments | « src/execution.cc ('k') | src/js/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698