Chromium Code Reviews| Index: base/time/time.cc |
| diff --git a/base/time/time.cc b/base/time/time.cc |
| index df3942cc858c5ecc7277a3a5db4e02cc0b946ccb..f5cefd49e0a2591b2656d55efeee7b62193f3551 100644 |
| --- a/base/time/time.cc |
| +++ b/base/time/time.cc |
| @@ -235,7 +235,12 @@ Time Time::LocalMidnight() const { |
| exploded.minute = 0; |
| exploded.second = 0; |
| exploded.millisecond = 0; |
| - return FromLocalExploded(exploded); |
| + Time out_time; |
| + if (FromLocalExploded(exploded, &out_time)) |
| + return out_time; |
| + // This function must not fail. |
| + NOTREACHED(); |
| + return Time(); |
| } |
| // static |