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

Unified Diff: src/runtime/runtime-json.cc

Issue 2008293002: Revert of [json] support replacer function in BasicJsonStringifier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@jsonproplist
Patch Set: 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 | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-json.cc
diff --git a/src/runtime/runtime-json.cc b/src/runtime/runtime-json.cc
index 2280d85ce26336769d4e4000daf88c095e1dc70c..9b665e334aba6e7ec6370611b3123d2494318640 100644
--- a/src/runtime/runtime-json.cc
+++ b/src/runtime/runtime-json.cc
@@ -13,6 +13,24 @@
namespace v8 {
namespace internal {
+
+RUNTIME_FUNCTION(Runtime_QuoteJSONString) {
+ HandleScope scope(isolate);
+ CONVERT_ARG_HANDLE_CHECKED(String, string, 0);
+ DCHECK(args.length() == 1);
+ RETURN_RESULT_OR_FAILURE(
+ isolate, BasicJsonStringifier::StringifyString(isolate, string));
+}
+
+RUNTIME_FUNCTION(Runtime_BasicJSONStringify) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 3);
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
+ CONVERT_ARG_HANDLE_CHECKED(Object, replacer, 1);
+ CONVERT_ARG_HANDLE_CHECKED(Object, gap, 2);
+ RETURN_RESULT_OR_FAILURE(
+ isolate, BasicJsonStringifier(isolate).Stringify(object, replacer, gap));
+}
RUNTIME_FUNCTION(Runtime_ParseJson) {
HandleScope scope(isolate);
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698