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

Side by Side Diff: src/date.js

Issue 9809010: Fix the return type of the date set methods. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 return UTC_DATE_VALUE(this); 509 return UTC_DATE_VALUE(this);
510 } 510 }
511 511
512 512
513 // ECMA 262 - 15.9.5.28 513 // ECMA 262 - 15.9.5.28
514 function DateSetMilliseconds(ms) { 514 function DateSetMilliseconds(ms) {
515 CHECK_DATE(this); 515 CHECK_DATE(this);
516 var t = LOCAL_DATE_VALUE(this); 516 var t = LOCAL_DATE_VALUE(this);
517 ms = ToNumber(ms); 517 ms = ToNumber(ms);
518 var time = MakeTime(LOCAL_HOUR(this), LOCAL_MIN(this), LOCAL_SEC(this), ms); 518 var time = MakeTime(LOCAL_HOUR(this), LOCAL_MIN(this), LOCAL_SEC(this), ms);
519 SET_LOCAL_DATE_VALUE(this, MakeDate(LOCAL_DAYS(this), time)); 519 return SET_LOCAL_DATE_VALUE(this, MakeDate(LOCAL_DAYS(this), time));
520 return this;
521 } 520 }
522 521
523 522
524 // ECMA 262 - 15.9.5.29 523 // ECMA 262 - 15.9.5.29
525 function DateSetUTCMilliseconds(ms) { 524 function DateSetUTCMilliseconds(ms) {
526 CHECK_DATE(this); 525 CHECK_DATE(this);
527 var t = UTC_DATE_VALUE(this); 526 var t = UTC_DATE_VALUE(this);
528 ms = ToNumber(ms); 527 ms = ToNumber(ms);
529 var time = MakeTime(UTC_HOUR(this), 528 var time = MakeTime(UTC_HOUR(this),
530 UTC_MIN(this), 529 UTC_MIN(this),
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 "toGMTString", DateToGMTString, 864 "toGMTString", DateToGMTString,
866 "toUTCString", DateToUTCString, 865 "toUTCString", DateToUTCString,
867 "getYear", DateGetYear, 866 "getYear", DateGetYear,
868 "setYear", DateSetYear, 867 "setYear", DateSetYear,
869 "toISOString", DateToISOString, 868 "toISOString", DateToISOString,
870 "toJSON", DateToJSON 869 "toJSON", DateToJSON
871 )); 870 ));
872 } 871 }
873 872
874 SetUpDate(); 873 SetUpDate();
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698