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

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

Issue 1891203002: Expose JSON stringifier through V8 API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed compile error on linux Created 4 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
Index: src/runtime/runtime-json.cc
diff --git a/src/runtime/runtime-json.cc b/src/runtime/runtime-json.cc
index 07232d59b8ba66c59d4d315dea0315f62bc9230a..72fc758ec83abd40fae6383134b88b2134f795e5 100644
--- a/src/runtime/runtime-json.cc
+++ b/src/runtime/runtime-json.cc
@@ -8,7 +8,6 @@
#include "src/char-predicates-inl.h"
#include "src/isolate-inl.h"
#include "src/json-parser.h"
-#include "src/json-stringifier.h"
#include "src/objects-inl.h"
namespace v8 {
@@ -20,23 +19,20 @@ RUNTIME_FUNCTION(Runtime_QuoteJSONString) {
DCHECK(args.length() == 1);
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result, BasicJsonStringifier::StringifyString(isolate, string));
+ isolate, result, Runtime::BasicJsonStringifyString(isolate, string));
return *result;
}
-
RUNTIME_FUNCTION(Runtime_BasicJSONStringify) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
- BasicJsonStringifier stringifier(isolate);
Handle<Object> result;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
- stringifier.Stringify(object));
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result, Runtime::BasicJsonStringify(isolate, object));
return *result;
}
-
RUNTIME_FUNCTION(Runtime_ParseJson) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
« src/api.cc ('K') | « src/runtime/runtime.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698