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

Issue 1576323002: Prevent a race condition with MidiHost IPC sending. (Closed)

Created:
4 years, 11 months ago by Oliver Chang
Modified:
4 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, toyoshim+midi_chromium.org, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent a race condition with MidiHost IPC sending. EndSession() is moved from MidiHost's destructor into OnChannelClosing() before the destruction process starts (at which point it is unsafe to call any functions on the MidiHost/MidiManagerClient). Also moves a function call on a MidiManagerClient in MidiManager into the AutoLock scope. BUG=576383 R=toyoshim@chromium.org,agoode@chromium.org Committed: https://crrev.com/bd648ad6116ad3eb09356fb8c34fb006dbe86d4c Cr-Commit-Position: refs/heads/master@{#369091}

Patch Set 1 #

Patch Set 2 : minor comment nit #

Total comments: 2

Patch Set 3 : better fix #

Total comments: 2

Patch Set 4 : style #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -10 lines) Patch
M content/browser/media/midi_host.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/media/midi_host.cc View 1 2 3 1 chunk +12 lines, -3 lines 0 comments Download
M media/midi/midi_manager.cc View 1 2 3 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
Oliver Chang
ptal. not sure if there is a better fix.
4 years, 11 months ago (2016-01-12 05:08:27 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1576323002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1576323002/20001
4 years, 11 months ago (2016-01-12 05:15:11 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-12 06:47:07 UTC) #5
Takashi Toyoshima
Thank you for working on this. I'm back from vacation today. https://codereview.chromium.org/1576323002/diff/20001/content/browser/media/midi_host.cc File content/browser/media/midi_host.cc (right): ...
4 years, 11 months ago (2016-01-12 10:20:51 UTC) #6
Oliver Chang
ptal at patchset #3, thanks! https://codereview.chromium.org/1576323002/diff/20001/content/browser/media/midi_host.cc File content/browser/media/midi_host.cc (right): https://codereview.chromium.org/1576323002/diff/20001/content/browser/media/midi_host.cc#newcode70 content/browser/media/midi_host.cc:70: // If we get ...
4 years, 11 months ago (2016-01-12 16:38:11 UTC) #10
Adam Goode
Thanks for fixing this issue. The destructor was not the right place for this functionality. ...
4 years, 11 months ago (2016-01-12 17:36:45 UTC) #11
Oliver Chang
https://codereview.chromium.org/1576323002/diff/40001/content/browser/media/midi_host.cc File content/browser/media/midi_host.cc (right): https://codereview.chromium.org/1576323002/diff/40001/content/browser/media/midi_host.cc#newcode62 content/browser/media/midi_host.cc:62: MidiHost::~MidiHost() {} On 2016/01/12 17:36:45, Adam Goode wrote: > ...
4 years, 11 months ago (2016-01-12 17:48:55 UTC) #12
Adam Goode
lgtm I am not an owner though.
4 years, 11 months ago (2016-01-12 17:53:33 UTC) #13
Takashi Toyoshima
LGTM.
4 years, 11 months ago (2016-01-13 01:20:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1576323002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1576323002/60001
4 years, 11 months ago (2016-01-13 01:34:44 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 11 months ago (2016-01-13 03:42:46 UTC) #18
commit-bot: I haz the power
4 years, 11 months ago (2016-01-13 03:43:56 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/bd648ad6116ad3eb09356fb8c34fb006dbe86d4c
Cr-Commit-Position: refs/heads/master@{#369091}

Powered by Google App Engine
This is Rietveld 408576698