Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/src/runtime/runtime-json.cc b/src/runtime/runtime-json.cc
index 647f48b..45f8183 100644
--- a/src/runtime/runtime-json.cc
+++ b/src/runtime/runtime-json.cc
@@ -2,12 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/v8.h"
+#include "src/runtime/runtime-utils.h"
#include "src/arguments.h"
-#include "src/json-parser.h"
+#include "src/char-predicates-inl.h"
+#include "src/isolate-inl.h"
#include "src/json-stringifier.h"
-#include "src/runtime/runtime-utils.h"
+#include "src/objects-inl.h"
+#include "src/parsing/json-parser.h"
namespace v8 {
namespace internal {
@@ -37,9 +39,11 @@
RUNTIME_FUNCTION(Runtime_ParseJson) {
HandleScope scope(isolate);
- DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(String, source, 0);
-
+ DCHECK_EQ(1, args.length());
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
+ Handle<String> source;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, source,
+ Object::ToString(isolate, object));
source = String::Flatten(source);
// Optimized fast case where we only have Latin1 characters.
Handle<Object> result;
@@ -49,5 +53,6 @@
: JsonParser<false>::Parse(source));
return *result;
}
-}
-} // namespace v8::internal
+
+} // namespace internal
+} // namespace v8