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

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

Issue 2026563002: [json] implement InternalizeJSONProperty in C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase and address comments 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') | no next file » | 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
index 2280d85ce26336769d4e4000daf88c095e1dc70c..cba8e11f78bf74e90732f4513628da1f51713032 100644
--- a/src/runtime/runtime-json.cc
+++ b/src/runtime/runtime-json.cc
@@ -16,16 +16,18 @@ namespace internal {
RUNTIME_FUNCTION(Runtime_ParseJson) {
HandleScope scope(isolate);
- DCHECK_EQ(1, args.length());
+ 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(source)
- : JsonParser<false>::Parse(source));
+ RETURN_RESULT_OR_FAILURE(
+ isolate, source->IsSeqOneByteString()
+ ? JsonParser<true>::Parse(isolate, source, reviver)
+ : JsonParser<false>::Parse(isolate, source, reviver));
}
} // namespace internal
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698