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

Unified Diff: src/json-stringifier.h

Issue 1294583006: Clean up native context slots and add new ones. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/json.js ('k') | src/math.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index e79d2ebc1ea5cf4760fedcc34dc04da18468fcd7..5d7235e8bebe48216e7b2ce250fa0e5d0bb9d2a7 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -358,16 +358,11 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeGeneric(
Handle<Object> key,
bool deferred_comma,
bool deferred_key) {
- Handle<JSObject> builtins(isolate_->native_context()->builtins(), isolate_);
- Handle<JSFunction> builtin = Handle<JSFunction>::cast(
- Object::GetProperty(isolate_, builtins, "$jsonSerializeAdapter")
- .ToHandleChecked());
-
+ Handle<JSFunction> fun = isolate_->json_serialize_adapter();
Handle<Object> argv[] = { key, object };
Handle<Object> result;
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
- isolate_, result,
- Execution::Call(isolate_, builtin, object, 2, argv),
+ isolate_, result, Execution::Call(isolate_, fun, object, 2, argv),
EXCEPTION);
if (result->IsUndefined()) return UNCHANGED;
if (deferred_key) {
« no previous file with comments | « src/json.js ('k') | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698