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

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

Issue 1847823004: Expose JSON stringifier through V8 API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Compile Created 4 years, 9 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
« include/v8.h ('K') | « src/runtime/runtime-json.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 5bdb08541f18d5075b5140dceea9d1fba4a88636..ceb3a518484e2cf5ff7ed5f15dac3ea16e3bd3f6 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -8,6 +8,7 @@
#include "src/bootstrapper.h"
#include "src/debug/debug.h"
#include "src/isolate-inl.h"
+#include "src/json-stringifier.h"
#include "src/messages.h"
#include "src/property-descriptor.h"
#include "src/runtime/runtime.h"
@@ -225,6 +226,15 @@ MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate,
return value;
}
+MaybeHandle<Object> Runtime::BasicJsonStringify(Isolate* isolate,
+ Handle<Object> object) {
+ return BasicJsonStringifier(isolate).Stringify(object);
+}
+
+MaybeHandle<Object> Runtime::BasicJsonStringifyString(Isolate* isolate,
+ Handle<String> string) {
+ return BasicJsonStringifier::StringifyString(isolate, string);
+}
RUNTIME_FUNCTION(Runtime_GetPrototype) {
HandleScope scope(isolate);
« include/v8.h ('K') | « src/runtime/runtime-json.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698