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

Unified Diff: base/time/time.cc

Issue 2593073002: base::Time should correctly handle -epoch time values from Javascript (Closed)
Patch Set: Created 4 years 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 | base/time/time_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index df3942cc858c5ecc7277a3a5db4e02cc0b946ccb..397ba15d227a710df19614f62e972b43cf0c9600 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -191,10 +191,6 @@ Time Time::FromJsTime(double ms_since_epoch) {
}
double Time::ToJsTime() const {
- if (is_null()) {
- // Preserve 0 so the invalid result doesn't depend on the platform.
- return 0;
- }
if (is_max()) {
// Preserve max without offset to prevent overflow.
return std::numeric_limits<double>::infinity();
« no previous file with comments | « no previous file | base/time/time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698