DescriptionManage MIDI related objects and sessions' lifecycles correctly
Following changes are needed to maintain MIDIPortInfoList contents
consistent in each MidiMessageFilter instances when MidiManager
update the list asynchronously.
Essential changes:
- Call EndSession iff a session is open.
- Do not use client_id to communicate between browser and renderer.
Multiple clients are managed in a MidiMessageFilter existing in
each renderer.
Minor changes:
- Remove midi_manager_ checks in MIDIHost, and add CHECK insteads.
- Rename MidiManagerFilter::StartSession to MidiManagerFilter::AddClient
to be aligned with RemoveClient. A session can be shared with multiple
clients.
After this change, MidiManager::EndSession is called from each Renderer
and RendererHost at the right timing, e.g., GC collects the last MIDIAccess
reference in JavaScript. See, also http://crbug.com/424859.
BUG=424859
Committed: https://crrev.com/71fcb150d9e2cb5e2f05069177ac611ac9c189c0
Cr-Commit-Position: refs/heads/master@{#300851}
Patch Set 1 #Patch Set 2 : remove client_id #Patch Set 3 : unittest #
Total comments: 24
Patch Set 4 : for review #3 (rebase was needed for try) #Patch Set 5 : [rebase not for review, but for trybots] #
Total comments: 9
Patch Set 6 : fix rebase error that causes build errros #Patch Set 7 : address review comments at #7 #
Total comments: 14
Patch Set 8 : [rebase - work from another machine] #Patch Set 9 : lock free! #
Total comments: 1
Patch Set 10 : one line bug fix #
Messages
Total messages: 29 (6 generated)
|