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

Unified Diff: src/json.js

Issue 1123703002: Reland "Wrap v8natives.js into a function." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revert stack trace printing 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/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 a896e2922210449c7f59e508abceea5142cb1ff3..26948fc6ba7b27cf95c2d36bc861b963ba312e4c 100644
--- a/src/json.js
+++ b/src/json.js
@@ -25,7 +25,7 @@ function Revive(holder, name, reviver) {
}
} else {
for (var p in val) {
- if (%_CallFunction(val, p, ObjectHasOwnProperty)) {
+ if (%_CallFunction(val, p, $objectHasOwnProperty)) {
var newElement = Revive(val, p, reviver);
if (IS_UNDEFINED(newElement)) {
delete val[p];
@@ -91,7 +91,7 @@ function SerializeObject(value, replacer, stack, indent, gap) {
if (IS_ARRAY(replacer)) {
var length = replacer.length;
for (var i = 0; i < length; i++) {
- if (%_CallFunction(replacer, i, ObjectHasOwnProperty)) {
+ if (%_CallFunction(replacer, i, $objectHasOwnProperty)) {
var p = replacer[i];
var strP = JSONSerialize(p, value, replacer, stack, indent, gap);
if (!IS_UNDEFINED(strP)) {
@@ -104,7 +104,7 @@ function SerializeObject(value, replacer, stack, indent, gap) {
}
} else {
for (var p in value) {
- if (%_CallFunction(value, p, ObjectHasOwnProperty)) {
+ if (%_CallFunction(value, p, $objectHasOwnProperty)) {
var strP = JSONSerialize(p, value, replacer, stack, indent, gap);
if (!IS_UNDEFINED(strP)) {
var member = %QuoteJSONString(p) + ":";
@@ -224,7 +224,7 @@ function JSONStringify(value, replacer, space) {
%AddNamedProperty(GlobalJSON, symbolToStringTag, "JSON", READ_ONLY | DONT_ENUM);
// Set up non-enumerable properties of the JSON object.
-InstallFunctions(GlobalJSON, DONT_ENUM, [
+$installFunctions(GlobalJSON, DONT_ENUM, [
"parse", JSONParse,
"stringify", JSONStringify
]);
« 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