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

Unified Diff: src/json.js

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/isolate.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json.js
diff --git a/src/json.js b/src/json.js
index e405f87bab6b39a6905304adbc66ebd8f421d00d..ec8bc96afad8bc42e9c6ff8a0862d15ea41e7adc 100644
--- a/src/json.js
+++ b/src/json.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var $jsonSerializeAdapter;
-
(function(global, utils) {
"use strict";
@@ -244,11 +242,15 @@ utils.InstallFunctions(GlobalJSON, DONT_ENUM, [
// -------------------------------------------------------------------
// JSON Builtins
-$jsonSerializeAdapter = function(key, object) {
+function JsonSerializeAdapter(key, object) {
var holder = {};
holder[key] = object;
// No need to pass the actual holder since there is no replacer function.
return JSONSerialize(key, holder, UNDEFINED, new InternalArray(), "", "");
}
+utils.ExportToRuntime(function(to) {
+ to.JsonSerializeAdapter = JsonSerializeAdapter;
+});
+
})
« no previous file with comments | « src/isolate.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698