From 6716a7f641fbd520fde38d84daef4121ea978897 Mon Sep 17 00:00:00 2001 From: Jeremy Roman Date: Sun, 10 Sep 2017 22:22:47 -0400 Subject: [PATCH] Make v8::JSON::Stringify take Local instead of Local. It is legal to stringify other kinds of values, like strings and numbers. Since Local is convertible to Local, 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/657633 Reviewed-by: Yang Guo Commit-Queue: Jeremy Roman Cr-Commit-Position: refs/heads/master@{#47935} --- include/v8.h | 2 +- src/api.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/v8.h b/include/v8.h index 8996e1e8e5..8cd3ca9864 100644 --- a/include/v8.h +++ b/include/v8.h @@ -1829,7 +1829,7 @@ class V8_EXPORT JSON { * \return The corresponding string if successfully stringified. */ static V8_WARN_UNUSED_RESULT MaybeLocal Stringify( - Local context, Local json_object, + Local context, Local json_object, Local gap = Local()); }; diff --git a/src/api.cc b/src/api.cc index ae2b7e527f..52652ff00e 100644 --- a/src/api.cc +++ b/src/api.cc @@ -3275,7 +3275,7 @@ Local JSON::Parse(Local json_string) { } MaybeLocal JSON::Stringify(Local context, - Local json_object, + Local json_object, Local gap) { PREPARE_FOR_EXECUTION(context, JSON, Stringify, String); i::Handle object = Utils::OpenHandle(*json_object);