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); |