| Index: base/time/time.cc
|
| diff --git a/base/time/time.cc b/base/time/time.cc
|
| index 93a6195c18a9276aea08ab9a6d53d39a272d24bc..f5cefd49e0a2591b2656d55efeee7b62193f3551 100644
|
| --- a/base/time/time.cc
|
| +++ b/base/time/time.cc
|
| @@ -191,6 +191,10 @@ 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();
|
|
|