Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| index c8fa9d8076710e439c8767005e9b61272a3308c3..c5d0e39ed1d7b23c82ff5eda135b93917736935a 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| @@ -504,9 +504,13 @@ void HTMLVideoElement::MediaRemotingStarted() { |
| } |
| void HTMLVideoElement::MediaRemotingStopped() { |
| - if (media_remoting_status_ != MediaRemotingStatus::kDisabled) |
| - media_remoting_status_ = MediaRemotingStatus::kNotStarted; |
| + // Early return because this was already called when media remoting was |
| + // disabled. |
| + if (media_remoting_status_ == MediaRemotingStatus::kDisabled) |
| + return; |
| + DCHECK_EQ(media_remoting_status_, MediaRemotingStatus::kStarted); |
|
mlamouri (slow - plz ping)
2017/04/19 17:58:46
nit: swap the two parameters -- Also, I can't reme
xjz
2017/04/19 18:08:10
Done. Yes, MediaRemotingStatus is an enum class. C
|
| DCHECK(remoting_interstitial_); |
| + media_remoting_status_ = MediaRemotingStatus::kNotStarted; |
| remoting_interstitial_->Hide(); |
| } |