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

Unified Diff: media/midi/midi_manager.cc

Issue 1500153002: Fix crash with MIDI send for MidiManagerAlsa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary base::Unretained Created 5 years 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 | media/midi/midi_manager_alsa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager.cc
diff --git a/media/midi/midi_manager.cc b/media/midi/midi_manager.cc
index be2a1d526a0e229f8204e3fecc234ba956dd5717..5fe9f2139f0ff3d325b53a3478cec4b3caad3488 100644
--- a/media/midi/midi_manager.cc
+++ b/media/midi/midi_manager.cc
@@ -149,11 +149,10 @@ void MidiManager::EndSession(MidiManagerClient* client) {
}
void MidiManager::AccumulateMidiBytesSent(MidiManagerClient* client, size_t n) {
- {
- base::AutoLock auto_lock(lock_);
- if (clients_.find(client) == clients_.end())
- return;
- }
+ base::AutoLock auto_lock(lock_);
+ if (clients_.find(client) == clients_.end())
+ return;
+
client->AccumulateMidiBytesSent(n);
Takashi Toyoshima 2015/12/07 06:00:28 Good catch. Can you add a comment here? We are l
}
« no previous file with comments | « no previous file | media/midi/midi_manager_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698