Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2927)

Unified Diff: chrome/browser/media/webrtc_logging_handler_host.cc

Issue 137503002: Make WebRtcLoggingHandlerHost tolerant of out-of-order messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc_logging_handler_host.cc
diff --git a/chrome/browser/media/webrtc_logging_handler_host.cc b/chrome/browser/media/webrtc_logging_handler_host.cc
index bed00cb8757700aefc32b44e7e6485991aaf0205..3467e8b11667727038ffc35e39a76a73bc526ea6 100644
--- a/chrome/browser/media/webrtc_logging_handler_host.cc
+++ b/chrome/browser/media/webrtc_logging_handler_host.cc
@@ -219,6 +219,12 @@ bool WebRtcLoggingHandlerHost::OnMessageReceived(const IPC::Message& message,
void WebRtcLoggingHandlerHost::OnLoggingStoppedInRenderer() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ if (logging_state_ != STOPPING) {
+ // If an out-of-order response is received, stop_callback_ may be invalid,
+ // and must not be invoked.
+ BadMessageReceived();
tommi (sloooow) - chröme 2014/01/14 15:14:22 perhaps log an error and the current value of logg
+ return;
+ }
logging_state_ = STOPPED;
FireGenericDoneCallback(&stop_callback_, true, "");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698