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

Unified Diff: media/midi/midi_manager.h

Issue 323323002: Web MIDI: MidiManager crashes if a session is ended while initializing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 6 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 | media/midi/midi_manager.cc » ('j') | media/midi/midi_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/midi/midi_manager.h
diff --git a/media/midi/midi_manager.h b/media/midi/midi_manager.h
index f6c424b9e6f66c9525136bce6ec77ebb44d91ab0..3da22eee2b7fc87d16c500476c1198c602c4e849 100644
--- a/media/midi/midi_manager.h
+++ b/media/midi/midi_manager.h
@@ -141,7 +141,7 @@ class MEDIA_EXPORT MidiManager {
size_t clients_size_for_testing() const { return clients_.size(); }
size_t pending_clients_size_for_testing() const {
- return pending_clients_.size();
+ return pending_clients_size_;
}
private:
@@ -152,8 +152,9 @@ class MEDIA_EXPORT MidiManager {
ClientList clients_;
// Keeps track of all clients who are waiting for CompleteStartSession().
- typedef std::map<int, MidiManagerClient*> PendingClientMap;
+ typedef std::map<MidiManagerClient*, std::vector<int> > PendingClientMap;
yhirano 2014/06/11 12:11:57 [opt] You can use std::multimap<K, V> instead of s
Takashi Toyoshima 2014/06/12 04:41:02 Done.
PendingClientMap pending_clients_;
+ size_t pending_clients_size_;
// Keeps a SingleThreadTaskRunner of the thread that calls StartSession in
// order to invoke CompleteStartSession() on the thread.
« no previous file with comments | « no previous file | media/midi/midi_manager.cc » ('j') | media/midi/midi_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698