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

Unified Diff: src/date.js

Issue 1317403002: Make Date.prototype an ordinary object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix mozilla test 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 | « no previous file | test/mjsunit/date.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date.js
diff --git a/src/date.js b/src/date.js
index 2be8bcb220a7f3ed91ea1fb6943fa79398d5e4a7..4de1cad006542495a4a252e5bfcc7538c8cbb091 100644
--- a/src/date.js
+++ b/src/date.js
@@ -16,6 +16,7 @@ var $createDate;
// Imports
var GlobalDate = global.Date;
+var GlobalObject = global.Object;
var InternalArray = utils.InternalArray;
var IsFinite;
var MathAbs;
@@ -820,7 +821,7 @@ function CreateDate(time) {
// -------------------------------------------------------------------
%SetCode(GlobalDate, DateConstructor);
-%FunctionSetPrototype(GlobalDate, new GlobalDate(NAN));
+%FunctionSetPrototype(GlobalDate, new GlobalObject());
// Set up non-enumerable properties of the Date object itself.
utils.InstallFunctions(GlobalDate, DONT_ENUM, [
« no previous file with comments | « no previous file | test/mjsunit/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698