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

Issue 2929283002: Avoid AudioBufferSourceHandler data race. (Closed)

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

Description

Avoid AudioBufferSourceHandler data race. Following r478084, the main thread may contend with the audio thread on accessing AudioBufferSourceNodeHandler's mutable state. Coordinate such access by introducing a Mutex over |min_playback_rate_|. Using atomic ops would be the natural choice for handling this, but steering clear of those over doubles (cf. https://crrev.com/1256053006) until std::atomic<> is allowed. R=haraken,hongchan BUG=731568 Review-Url: https://codereview.chromium.org/2929283002 Cr-Commit-Position: refs/heads/master@{#478679} Committed: https://chromium.googlesource.com/chromium/src/+/7ad07b8cd01390ea3b8ec8e43c9827fb5f87891a

Patch Set 1 #

Patch Set 2 : minimize lock taking #

Total comments: 5

Patch Set 3 : rename accessor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -4 lines) Patch
M third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp View 1 2 2 chunks +14 lines, -4 lines 0 comments Download

Messages

Total messages: 24 (18 generated)
sof
please take a look. (If needed, see review mentioned in the commit message for context ...
3 years, 6 months ago (2017-06-10 06:25:16 UTC) #4
haraken
LGTM
3 years, 6 months ago (2017-06-12 00:02:30 UTC) #11
hongchan
Again, thanks for working on this! lgtm with nits https://codereview.chromium.org/2929283002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp File third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp (right): https://codereview.chromium.org/2929283002/diff/20001/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp#newcode602 third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp:602: ...
3 years, 6 months ago (2017-06-12 14:09:18 UTC) #12
sof
Thanks for the review; I don't see any other parts of the object state that's ...
3 years, 6 months ago (2017-06-12 14:51:57 UTC) #15
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/2929283002/40001
3 years, 6 months ago (2017-06-12 17:57:26 UTC) #21
commit-bot: I haz the power
3 years, 6 months ago (2017-06-12 18:03:46 UTC) #24
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/7ad07b8cd01390ea3b8ec8e43c98...

Powered by Google App Engine
This is Rietveld 408576698