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

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

Issue 2026643003: [json] replace remaining json.js code with C++ builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix error message Created 4 years, 7 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
« no previous file with comments | « src/runtime/runtime.h ('k') | src/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-json.cc
diff --git a/src/runtime/runtime-json.cc b/src/runtime/runtime-json.cc
deleted file mode 100644
index cba8e11f78bf74e90732f4513628da1f51713032..0000000000000000000000000000000000000000
--- a/src/runtime/runtime-json.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/runtime/runtime-utils.h"
-
-#include "src/arguments.h"
-#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 {
-namespace internal {
-
-RUNTIME_FUNCTION(Runtime_ParseJson) {
- HandleScope scope(isolate);
- DCHECK_EQ(2, args.length());
- CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, reviver, 1);
- 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.
- RETURN_RESULT_OR_FAILURE(
- isolate, source->IsSeqOneByteString()
- ? JsonParser<true>::Parse(isolate, source, reviver)
- : JsonParser<false>::Parse(isolate, source, reviver));
-}
-
-} // namespace internal
-} // namespace v8
« no previous file with comments | « src/runtime/runtime.h ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698