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

Unified Diff: src/api.cc

Issue 2004413002: [json] support property list argument in BasicJsonStringifier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 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 | « no previous file | src/js/json.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 48be379ab82e81ca6bd27130776b23733b91904f..b9ed02e6227927f20ff11774f449efbd7cc1d350 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2774,12 +2774,13 @@ MaybeLocal<String> JSON::Stringify(Local<Context> context,
Local<String> gap) {
PREPARE_FOR_EXECUTION(context, JSON, Stringify, String);
i::Handle<i::Object> object = Utils::OpenHandle(*json_object);
+ i::Handle<i::Object> replacer = isolate->factory()->undefined_value();
i::Handle<i::String> gap_string = gap.IsEmpty()
? isolate->factory()->empty_string()
: Utils::OpenHandle(*gap);
i::Handle<i::Object> maybe;
has_pending_exception = !i::BasicJsonStringifier(isolate)
- .Stringify(object, gap_string)
+ .Stringify(object, replacer, gap_string)
.ToHandle(&maybe);
RETURN_ON_FAILED_EXECUTION(String);
Local<String> result;
« no previous file with comments | « no previous file | src/js/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698