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

Unified Diff: src/json.js

Issue 1154793003: Revert of Hook up more import/exports in natives. (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/iterator-prototype.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 8b5f2294491433b26cd3b026b768772f0ada0697..d62bb1839ed4695165d9785e878c398cd17a2b36 100644
--- a/src/json.js
+++ b/src/json.js
@@ -18,12 +18,10 @@
var MathMax;
var MathMin;
-var ObjectHasOwnProperty;
utils.Import(function(from) {
MathMax = from.MathMax;
MathMin = from.MathMin;
- ObjectHasOwnProperty = from.ObjectHasOwnProperty;
});
// -------------------------------------------------------------------
@@ -39,7 +37,7 @@
}
} else {
for (var p in val) {
- if (HAS_OWN_PROPERTY(val, p)) {
+ if (%_CallFunction(val, p, $objectHasOwnProperty)) {
var newElement = Revive(val, p, reviver);
if (IS_UNDEFINED(newElement)) {
delete val[p];
@@ -101,7 +99,7 @@
if (IS_ARRAY(replacer)) {
var length = replacer.length;
for (var i = 0; i < length; i++) {
- if (HAS_OWN_PROPERTY(replacer, i)) {
+ if (%_CallFunction(replacer, i, $objectHasOwnProperty)) {
var p = replacer[i];
var strP = JSONSerialize(p, value, replacer, stack, indent, gap);
if (!IS_UNDEFINED(strP)) {
@@ -114,7 +112,7 @@
}
} else {
for (var p in value) {
- if (HAS_OWN_PROPERTY(value, p)) {
+ if (%_CallFunction(value, p, $objectHasOwnProperty)) {
var strP = JSONSerialize(p, value, replacer, stack, indent, gap);
if (!IS_UNDEFINED(strP)) {
var member = %QuoteJSONString(p) + ":";
@@ -234,7 +232,7 @@
%AddNamedProperty(GlobalJSON, symbolToStringTag, "JSON", READ_ONLY | DONT_ENUM);
// Set up non-enumerable properties of the JSON object.
-utils.InstallFunctions(GlobalJSON, DONT_ENUM, [
+$installFunctions(GlobalJSON, DONT_ENUM, [
"parse", JSONParse,
"stringify", JSONStringify
]);
« no previous file with comments | « src/iterator-prototype.js ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698