Commit 6716a7f6 authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Make v8::JSON::Stringify take Local<Value> instead of Local<Object>.

It is legal to stringify other kinds of values, like strings and numbers.
Since Local<Object> is convertible to Local<Value>, this is unlikely to
break callers.

Bug: v8:6810
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie8e97c86308d62cdf0a2a17490a6e20de58fc76e
Reviewed-on: https://chromium-review.googlesource.com/657633Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47935}
parent 5100a009
......@@ -1829,7 +1829,7 @@ class V8_EXPORT JSON {
* \return The corresponding string if successfully stringified.
*/
static V8_WARN_UNUSED_RESULT MaybeLocal<String> Stringify(
Local<Context> context, Local<Object> json_object,
Local<Context> context, Local<Value> json_object,
Local<String> gap = Local<String>());
};
......
......@@ -3275,7 +3275,7 @@ Local<Value> JSON::Parse(Local<String> json_string) {
}
MaybeLocal<String> JSON::Stringify(Local<Context> context,
Local<Object> json_object,
Local<Value> json_object,
Local<String> gap) {
PREPARE_FOR_EXECUTION(context, JSON, Stringify, String);
i::Handle<i::Object> object = Utils::OpenHandle(*json_object);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment