Index: media/blink/webcontentdecryptionmodulesession_impl.cc |
diff --git a/media/blink/webcontentdecryptionmodulesession_impl.cc b/media/blink/webcontentdecryptionmodulesession_impl.cc |
index 5ef54ee04a23852103129e43096de01b8b4e4d3b..963e3c9ec3ac3cb7ea3e17e31448f678931a2fff 100644 |
--- a/media/blink/webcontentdecryptionmodulesession_impl.cc |
+++ b/media/blink/webcontentdecryptionmodulesession_impl.cc |
@@ -494,7 +494,11 @@ void WebContentDecryptionModuleSessionImpl::OnSessionKeysChange( |
void WebContentDecryptionModuleSessionImpl::OnSessionExpirationUpdate( |
base::Time new_expiry_time) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- client_->expirationChanged(new_expiry_time.ToJsTime()); |
+ // The check works around an issue in base::Time that converts null base::Time |
+ // to |1601-01-01 00:00:00 UTC| in ToJsTime(). See http://crbug.com/679079 |
+ client_->expirationChanged(new_expiry_time.is_null() |
+ ? std::numeric_limits<double>::quiet_NaN() |
+ : new_expiry_time.ToJsTime()); |
} |
void WebContentDecryptionModuleSessionImpl::OnSessionClosed() { |