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

Issue 1149913002: Access current frame counter carefully and remove m_cachedSampleFrame. (Closed)

Created:
5 years, 7 months ago by Raymond Toy
Modified:
5 years, 7 months ago
CC:
blink-reviews
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Access current frame counter carefully and remove m_cachedSampleFrame. m_cachedSampleFrame was added in https://codereview.chromium.org/773273002 to handle a race condition on accessing the the current frame counter that is being updated in the audio thread. Use acquireLoad and releaseStore so no race can happen while it is being updated. BUG=488211 TEST=Ran the TSAN test case from issue 431874 without problems. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195816

Patch Set 1 #

Patch Set 2 : #

Total comments: 5

Patch Set 3 : Use acquireLoad/releaseStore #

Patch Set 4 : Remove workaround in scriptprocessornode test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -43 lines) Patch
M LayoutTests/webaudio/scriptprocessornode.html View 1 2 3 1 chunk +3 lines, -11 lines 0 comments Download
M Source/modules/webaudio/AudioContext.h View 2 chunks +9 lines, -9 lines 0 comments Download
M Source/modules/webaudio/AudioContext.cpp View 1 4 chunks +0 lines, -21 lines 0 comments Download
M Source/modules/webaudio/AudioDestinationNode.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/webaudio/AudioDestinationNode.cpp View 1 2 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 14 (4 generated)
Raymond Toy
PTAL
5 years, 7 months ago (2015-05-21 16:14:35 UTC) #2
hongchan
LGTM with one suggestion: can we have a short explanation why this can't be tested ...
5 years, 7 months ago (2015-05-21 16:21:34 UTC) #3
Raymond Toy
On 2015/05/21 16:21:34, hoch wrote: > LGTM with one suggestion: can we have a short ...
5 years, 7 months ago (2015-05-21 16:51:48 UTC) #4
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioContext.h File Source/modules/webaudio/AudioContext.h (right): https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioContext.h#newcode113 Source/modules/webaudio/AudioContext.h:113: return m_destinationNode ? m_destinationNode->audioDestinationHandler().currentSampleFrame() : 0; Is it safe ...
5 years, 7 months ago (2015-05-21 20:45:16 UTC) #5
Raymond Toy
https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioContext.h File Source/modules/webaudio/AudioContext.h (right): https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioContext.h#newcode113 Source/modules/webaudio/AudioContext.h:113: return m_destinationNode ? m_destinationNode->audioDestinationHandler().currentSampleFrame() : 0; On 2015/05/21 20:45:16, ...
5 years, 7 months ago (2015-05-21 21:19:06 UTC) #7
tkent
https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioContext.h File Source/modules/webaudio/AudioContext.h (right): https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioContext.h#newcode113 Source/modules/webaudio/AudioContext.h:113: return m_destinationNode ? m_destinationNode->audioDestinationHandler().currentSampleFrame() : 0; On 2015/05/21 21:19:06, ...
5 years, 7 months ago (2015-05-22 00:47:12 UTC) #8
Raymond Toy
https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioDestinationNode.cpp File Source/modules/webaudio/AudioDestinationNode.cpp (right): https://codereview.chromium.org/1149913002/diff/20001/Source/modules/webaudio/AudioDestinationNode.cpp#newcode94 Source/modules/webaudio/AudioDestinationNode.cpp:94: atomicAdd(&m_currentSampleFrame, numberOfFrames); On 2015/05/22 00:47:12, tkent wrote: > I ...
5 years, 7 months ago (2015-05-22 16:13:48 UTC) #9
Ken Russell (switch to Gerrit)
Thanks tkent@ for the suggestion. LGTM
5 years, 7 months ago (2015-05-22 18:23:21 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1149913002/60001
5 years, 7 months ago (2015-05-22 21:26:56 UTC) #13
commit-bot: I haz the power
5 years, 7 months ago (2015-05-22 22:16:48 UTC) #14
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=195816

Powered by Google App Engine
This is Rietveld 408576698