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

Unified Diff: src/js/json.js

Issue 1574223002: Revert of [builtins] Refactor the remaining Date builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/js/date.js ('k') | src/js/macros.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/json.js
diff --git a/src/js/json.js b/src/js/json.js
index b8836eaddd919fb9387c962391f4075e7df8e302..ee3b9dceea217062f077131c5807b3716352a6e5 100644
--- a/src/js/json.js
+++ b/src/js/json.js
@@ -11,7 +11,6 @@
// -------------------------------------------------------------------
// Imports
-var GlobalDate = global.Date;
var GlobalJSON = global.JSON;
var GlobalSet = global.Set;
var InternalArray = utils.InternalArray;
@@ -248,24 +247,6 @@
]);
// -------------------------------------------------------------------
-// Date.toJSON
-
-// 20.3.4.37 Date.prototype.toJSON ( key )
-function DateToJSON(key) {
- var o = TO_OBJECT(this);
- var tv = TO_PRIMITIVE_NUMBER(o);
- if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) {
- return null;
- }
- return o.toISOString();
-}
-
-// Set up non-enumerable functions of the Date prototype object.
-utils.InstallFunctions(GlobalDate.prototype, DONT_ENUM, [
- "toJSON", DateToJSON
-]);
-
-// -------------------------------------------------------------------
// JSON Builtins
function JsonSerializeAdapter(key, object) {
« no previous file with comments | « src/js/date.js ('k') | src/js/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698