Commit bc40a7f9 authored by Hongchan Choi's avatar Hongchan Choi Committed by Commit Bot

Use NoBarrierStore/Load to suppress TSAN warning.

Currently |reduction_| in DynamicsCompressorHandler is accessed by
two different threads without any protection. Adding
NoBarrierStore/Load will suppress the warning, and also
indicates that we have a benign data race in |reduction_|.

See also: https://codereview.chromium.org/1461743002/

Bug: 755393
Change-Id: I3946772b55fdd6b6e7c806058306d0f81a855c69
Reviewed-on: https://chromium-review.googlesource.com/927713
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551555}
parent d20bd588
......@@ -95,8 +95,9 @@ void DynamicsCompressorHandler::Process(size_t frames_to_process) {
dynamics_compressor_->Process(Input(0).Bus(), output_bus, frames_to_process);
reduction_ =
float reduction =
dynamics_compressor_->ParameterValue(DynamicsCompressor::kParamReduction);
NoBarrierStore(&reduction_, reduction);
}
void DynamicsCompressorHandler::ProcessOnlyAudioParams(
......
......@@ -56,7 +56,7 @@ class MODULES_EXPORT DynamicsCompressorHandler final : public AudioHandler {
void ProcessOnlyAudioParams(size_t frames_to_process) override;
void Initialize() override;
float ReductionValue() const { return reduction_; }
float ReductionValue() const { return NoBarrierLoad(&reduction_); }
void SetChannelCount(unsigned long, ExceptionState&) final;
void SetChannelCountMode(const String&, ExceptionState&) final;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment