Chromium Code Reviews| Index: content/browser/renderer_host/media/audio_renderer_host.cc |
| diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc |
| index 77d21c86e51dc525f88568942af8f70d8a094911..a3dad22a7554b6ec2d41c8608e99674cf5d6d7a4 100644 |
| --- a/content/browser/renderer_host/media/audio_renderer_host.cc |
| +++ b/content/browser/renderer_host/media/audio_renderer_host.cc |
| @@ -495,7 +495,13 @@ void AudioRendererHost::OnCreateStream(int stream_id, |
| std::string device_unique_id; |
| const auto& auth_data = authorizations_.find(stream_id); |
| if (auth_data != authorizations_.end()) { |
| - CHECK(auth_data->second.first); |
| + if (!auth_data->second.first) { |
| + // The authorization for this stream is still pending, so it's an error |
| + // to create it now. |
| + content::bad_message::ReceivedBadMessage( |
| + this, bad_message::ARH_CREATED_WITHOUT_AUTHORIZATION); |
|
Guido Urdaneta
2016/10/04 13:05:45
nit: I think ARH_CREATED_STREAM_WITHOUT_AUTHORIZAT
Max Morin
2016/10/04 13:28:36
Done.
|
| + return; |
| + } |
| device_unique_id.swap(auth_data->second.second); |
| authorizations_.erase(auth_data); |
| } |