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

Issue 2638413004: Don't run removeFinishedSourceNodes with the context lock. (Closed)

Created:
3 years, 11 months ago by Raymond Toy
Modified:
3 years, 11 months ago
Reviewers:
hongchan
CC:
chromium-reviews, blink-reviews, haraken
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't run removeFinishedSourceNodes with the context lock. releaseFinishedSourceNodes is run from handlePostRenderTask on the audio thread which has the context lock. releaseFinishedSourceNodes can call removeFinishedSourceNodes which runs on the main thread which will also get the context lock. Depending on how fast things are, this second attempt to get the lock may happen while handlePostRenderTask still has the lock, causing a cycle. Therefore, move the call to removeFinishedSourceNodes outside the lock. This is ok, since removeFinishedSourceNodes doesn't do anything without acquiring the context lock. BUG=681316 TEST=test case from the bug passes on a tsan build Review-Url: https://codereview.chromium.org/2638413004 Cr-Commit-Position: refs/heads/master@{#445467} Committed: https://chromium.googlesource.com/chromium/src/+/b82438a6b9cf9324f9d2b3780ea270b7bff62a93

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add removeFinishedSourceNodesOnMainThread #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -18 lines) Patch
M third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h View 1 2 chunks +13 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp View 1 4 chunks +19 lines, -9 lines 6 comments Download
M third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp View 1 2 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 25 (8 generated)
Raymond Toy
PTAL at this preliminary patch. I think we may want to add another function named, ...
3 years, 11 months ago (2017-01-18 23:12:32 UTC) #4
hongchan
https://codereview.chromium.org/2638413004/diff/1/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (left): https://codereview.chromium.org/2638413004/diff/1/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#oldcode671 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:671: m_finishedSourceHandlers.clear(); We don't have this line in the patchset ...
3 years, 11 months ago (2017-01-19 12:47:43 UTC) #7
Raymond Toy
https://codereview.chromium.org/2638413004/diff/1/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (left): https://codereview.chromium.org/2638413004/diff/1/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#oldcode671 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:671: m_finishedSourceHandlers.clear(); On 2017/01/19 12:47:43, hongchan wrote: > We don't ...
3 years, 11 months ago (2017-01-20 19:36:10 UTC) #8
hongchan
https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:765: removeFinishedSourceNodes(didRemove); What's the difference between doing the above and ...
3 years, 11 months ago (2017-01-20 23:27:05 UTC) #9
Raymond Toy
https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:765: removeFinishedSourceNodes(didRemove); On 2017/01/20 23:27:05, hongchan wrote: > What's the ...
3 years, 11 months ago (2017-01-21 00:12:16 UTC) #10
hongchan
https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:765: removeFinishedSourceNodes(didRemove); On 2017/01/21 00:12:15, Raymond Toy wrote: > On ...
3 years, 11 months ago (2017-01-23 17:38:41 UTC) #11
Raymond Toy
https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:765: removeFinishedSourceNodes(didRemove); On 2017/01/23 17:38:41, hongchan wrote: > On 2017/01/21 ...
3 years, 11 months ago (2017-01-23 17:45:01 UTC) #12
hongchan
On 2017/01/23 17:45:01, Raymond Toy wrote: > https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp > File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): > > https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 ...
3 years, 11 months ago (2017-01-23 17:47:52 UTC) #13
Raymond Toy
On 2017/01/23 17:47:52, hongchan wrote: > On 2017/01/23 17:45:01, Raymond Toy wrote: > > > ...
3 years, 11 months ago (2017-01-23 17:55:55 UTC) #14
hongchan
https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:765: removeFinishedSourceNodes(didRemove); On 2017/01/23 17:45:01, Raymond Toy wrote: > On ...
3 years, 11 months ago (2017-01-23 18:08:06 UTC) #15
Raymond Toy
https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp:765: removeFinishedSourceNodes(didRemove); On 2017/01/23 18:08:06, hongchan wrote: > On 2017/01/23 ...
3 years, 11 months ago (2017-01-23 18:11:21 UTC) #16
hongchan
On 2017/01/23 18:11:21, Raymond Toy wrote: > https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp > File third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp (right): > > https://codereview.chromium.org/2638413004/diff/20001/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp#newcode765 ...
3 years, 11 months ago (2017-01-23 18:15:21 UTC) #17
Raymond Toy
On 2017/01/23 18:15:21, hongchan wrote: > On 2017/01/23 18:11:21, Raymond Toy wrote: > > > ...
3 years, 11 months ago (2017-01-23 18:17:34 UTC) #18
Raymond Toy
On 2017/01/23 18:17:34, Raymond Toy wrote: > On 2017/01/23 18:15:21, hongchan wrote: > > On ...
3 years, 11 months ago (2017-01-23 18:22:43 UTC) #19
hongchan
lgtm
3 years, 11 months ago (2017-01-23 18:23:06 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2638413004/20001
3 years, 11 months ago (2017-01-23 18:27:26 UTC) #22
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 20:29:13 UTC) #25
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/b82438a6b9cf9324f9d2b3780ea2...

Powered by Google App Engine
This is Rietveld 408576698