Chromium Code Reviews| Index: ash/system/date/date_view.cc |
| diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc |
| index 0ba186335bc698f30b8f527b1492dab41fb8e15d..c0849f7bf7a1d3ff65f48c51229969e8d939dd10 100644 |
| --- a/ash/system/date/date_view.cc |
| +++ b/ash/system/date/date_view.cc |
| @@ -181,6 +181,14 @@ void TimeView::UpdateTimeFormat() { |
| } |
| void TimeView::UpdateTextInternal(const base::Time& now) { |
| + // Just in case |now| is invalid, do NOT update time; otherwise, it will |
| + // crash icu code by calling into base::TimeFormatTimeOfDayWithHourClockType, |
| + // see details in crbug.com/147570. |
| + if (now.ToInternalValue() == 0L) { |
|
brettw
2012/09/11 18:10:23
Use now.is_null().
jennyz
2012/09/11 18:35:22
Done.
|
| + LOG(ERROR) << "Received invalid base::Time now value in the argument"; |
| + return; |
| + } |
| + |
| string16 current_time = base::TimeFormatTimeOfDayWithHourClockType( |
| now, hour_type_, base::kDropAmPm); |
| label_->SetText(current_time); |