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

Issue 2006563003: Simplify notification of a dirty listener. (Closed)

Created:
4 years, 7 months ago by Raymond Toy
Modified:
4 years, 7 months ago
Reviewers:
hongchan
CC:
chromium-reviews, blink-reviews, haraken
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify notification of a dirty listener. Instead of the listener updating the dirty state of all panners, just set a dirty state flag in the listener. Then, when a panner needs to compute a new azimuth/elevation gain or cone gain, the panner just checks to see if the listener is dirty. This gets rid of the data race where both the audio thread and the main thread are updating the dirty state of a panner. The checking and setting of the listener state happens on the audio thread. The race from reading from the hash table of panners in AudioListener and adding to the table from the main thread is also removed. BUG=612948, 612955, 613332 TEST=none Committed: https://crrev.com/a6beb9f31fba1c7892fbfb4911f34e5a13492183 Cr-Commit-Position: refs/heads/master@{#395738}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Fix test failures #

Total comments: 3

Patch Set 4 : Add trylock for updateState #

Total comments: 1

Patch Set 5 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -21 lines) Patch
M third_party/WebKit/Source/modules/webaudio/AudioListener.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioListener.cpp View 1 2 3 4 5 chunks +32 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/PannerNode.h View 1 2 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/PannerNode.cpp View 1 2 4 chunks +13 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (10 generated)
Raymond Toy
PTAL. Manually verified that both crashes in 613332 are fixed as well as the tests ...
4 years, 7 months ago (2016-05-24 16:34:45 UTC) #5
hongchan
https://codereview.chromium.org/2006563003/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp File third_party/WebKit/Source/modules/webaudio/AudioListener.cpp (right): https://codereview.chromium.org/2006563003/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp#newcode37 third_party/WebKit/Source/modules/webaudio/AudioListener.cpp:37: AudioListener::AudioListener(AbstractAudioContext& context) Seems like we're getting context in the ...
4 years, 7 months ago (2016-05-24 17:00:23 UTC) #6
Raymond Toy
https://codereview.chromium.org/2006563003/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp File third_party/WebKit/Source/modules/webaudio/AudioListener.cpp (right): https://codereview.chromium.org/2006563003/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp#newcode37 third_party/WebKit/Source/modules/webaudio/AudioListener.cpp:37: AudioListener::AudioListener(AbstractAudioContext& context) On 2016/05/24 17:00:23, hoch wrote: > Seems ...
4 years, 7 months ago (2016-05-24 17:22:09 UTC) #7
hongchan
On 2016/05/24 17:22:09, Raymond Toy wrote: > https://codereview.chromium.org/2006563003/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp > File third_party/WebKit/Source/modules/webaudio/AudioListener.cpp (right): > > https://codereview.chromium.org/2006563003/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp#newcode37 ...
4 years, 7 months ago (2016-05-24 17:25:07 UTC) #8
Raymond Toy
On 2016/05/24 17:25:07, hoch wrote: > On 2016/05/24 17:22:09, Raymond Toy wrote: > > > ...
4 years, 7 months ago (2016-05-24 17:36:04 UTC) #9
hongchan
lgtm https://codereview.chromium.org/2006563003/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioListener.h File third_party/WebKit/Source/modules/webaudio/AudioListener.h (right): https://codereview.chromium.org/2006563003/diff/60001/third_party/WebKit/Source/modules/webaudio/AudioListener.h#newcode182 third_party/WebKit/Source/modules/webaudio/AudioListener.h:182: // the audio thread. Thanks for 80-col wrap.
4 years, 7 months ago (2016-05-24 18:47:41 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006563003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006563003/60001
4 years, 7 months ago (2016-05-24 18:50:09 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/71018)
4 years, 7 months ago (2016-05-24 19:00:43 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2006563003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2006563003/80001
4 years, 7 months ago (2016-05-24 19:49:30 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-24 23:48:19 UTC) #19
commit-bot: I haz the power
4 years, 7 months ago (2016-05-24 23:49:43 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a6beb9f31fba1c7892fbfb4911f34e5a13492183
Cr-Commit-Position: refs/heads/master@{#395738}

Powered by Google App Engine
This is Rietveld 408576698