[WebAudio] Implement 2-second hysteresis for audibility IPCs [chromium/src : main]

0 views
Skip to first unread message

Hongchan Choi (Gerrit)

unread,
Jul 15, 2026, 3:54:39 PM (6 days ago) Jul 15
to Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
Attention needed from Michael Wilson

Hongchan Choi added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Hongchan Choi . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Wilson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
Gerrit-Change-Number: 8009971
Gerrit-PatchSet: 6
Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
Gerrit-Attention: Michael Wilson <mjwi...@chromium.org>
Gerrit-Comment-Date: Wed, 15 Jul 2026 19:54:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Wilson (Gerrit)

unread,
Jul 15, 2026, 8:58:32 PM (6 days ago) Jul 15
to Hongchan Choi, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
Attention needed from Hongchan Choi

Michael Wilson added 9 comments

Patchset-level comments
Hongchan Choi . resolved

PTAL

Michael Wilson

I gave some initial comments. I would like to take at least one more review pass to make sure I understand the control flow once the comments are addressed.

File third_party/blink/renderer/modules/webaudio/audio_context.h
Line 514, Patchset 6 (Latest): std::atomic<int> audibility_sequence_id_{0};
Michael Wilson . unresolved
We should use an unsigned datatype here, since over a high number of transitions this could overflow and signed overflow is undefined in C++.
```suggestion
std::atomic<unsigned> audibility_sequence_id_{0};
```
Line 384, Patchset 6 (Latest): void NotifyAudibleAudioStopped(int sequence_id, double silence_time)
Michael Wilson . unresolved
```suggestion
void NotifyAudibleAudioStopped(unsigned sequence_id, double silence_time)
```
Line 382, Patchset 6 (Latest): void NotifyAudibleAudioStarted(int sequence_id)
Michael Wilson . unresolved
```suggestion
void NotifyAudibleAudioStarted(unsigned sequence_id)
```
File third_party/blink/renderer/modules/webaudio/audio_context.cc
Line 1607, Patchset 6 (Latest):void AudioContext::NotifyAudibleAudioStarted(int sequence_id) {
Michael Wilson . unresolved

```suggestion
void AudioContext::NotifyAudibleAudioStarted(unsigned sequence_id) {
```

Line 1662, Patchset 6 (Latest): accumulated_silence_time_.store(0.0, std::memory_order_relaxed);
Michael Wilson . unresolved

Should we report or cache any accumulated silence time before setting back to 0? I'm thinking of a scenario where this is the first audible buffer after several silent buffers; in that case will we properly report the silence or will it be lost?

Line 1664, Patchset 6 (Latest): silence_time = accumulated_silence_time_.load(std::memory_order_relaxed) +
destination_bus->length() / static_cast<double>(sampleRate());
accumulated_silence_time_.store(silence_time, std::memory_order_relaxed);
Michael Wilson . unresolved
Maybe using `fetch_add` here would be slightly safer, since we wouldn't have any gap between the load and store:
```suggestion
const double increment = destination_bus->length() / static_cast<double>(sampleRate());
silence_time = accumulated_silence_time_.fetch_add(increment, std::memory_order_relaxed) + increment;
```
Line 1706, Patchset 6 (Latest): DeferredTaskHandler::GraphAutoLocker locker(GetDeferredTaskHandler());
Michael Wilson . unresolved

What is holding the graph lock here guarding against?

It seems like all the variables being modified in this block are atomics, which are not guarded in other usages by the graph lock. Would it make sense to not hold the lock here at all, and just rely on the atomic variables?

Line 2285, Patchset 6 (Latest): media_player_receiver_.reset();
Michael Wilson . unresolved

Is resetting the media player receiver related to the rest of the change?

Open in Gerrit

Related details

Attention is currently required from:
  • Hongchan Choi
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
    Gerrit-Change-Number: 8009971
    Gerrit-PatchSet: 6
    Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
    Gerrit-Attention: Hongchan Choi <hong...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 Jul 2026 00:58:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Hongchan Choi <hong...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hongchan Choi (Gerrit)

    unread,
    Jul 16, 2026, 1:02:22 PM (5 days ago) Jul 16
    to Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
    Attention needed from Michael Wilson

    Hongchan Choi voted and added 8 comments

    Votes added by Hongchan Choi

    Commit-Queue+1

    8 comments

    File third_party/blink/renderer/modules/webaudio/audio_context.h
    Line 514, Patchset 6: std::atomic<int> audibility_sequence_id_{0};
    Michael Wilson . resolved
    We should use an unsigned datatype here, since over a high number of transitions this could overflow and signed overflow is undefined in C++.
    ```suggestion
    std::atomic<unsigned> audibility_sequence_id_{0};
    ```
    Hongchan Choi

    Done

    Line 384, Patchset 6: void NotifyAudibleAudioStopped(int sequence_id, double silence_time)
    Michael Wilson . resolved
    ```suggestion
    void NotifyAudibleAudioStopped(unsigned sequence_id, double silence_time)
    ```
    Hongchan Choi

    Done

    Line 382, Patchset 6: void NotifyAudibleAudioStarted(int sequence_id)
    Michael Wilson . resolved
    ```suggestion
    void NotifyAudibleAudioStarted(unsigned sequence_id)
    ```
    Hongchan Choi

    Done

    File third_party/blink/renderer/modules/webaudio/audio_context.cc
    Line 1607, Patchset 6:void AudioContext::NotifyAudibleAudioStarted(int sequence_id) {
    Michael Wilson . resolved

    ```suggestion
    void AudioContext::NotifyAudibleAudioStarted(unsigned sequence_id) {
    ```

    Hongchan Choi

    Done

    Line 1662, Patchset 6: accumulated_silence_time_.store(0.0, std::memory_order_relaxed);
    Michael Wilson . resolved

    Should we report or cache any accumulated silence time before setting back to 0? I'm thinking of a scenario where this is the first audible buffer after several silent buffers; in that case will we properly report the silence or will it be lost?

    Hongchan Choi

    By design, this hysteresis is strictly for tracking audibility metrics (unlike dynamic range processors like gates or expanders that manipulate the audio signal). I propose keeping it simple by resetting it back to 0.

    Line 1664, Patchset 6: silence_time = accumulated_silence_time_.load(std::memory_order_relaxed) +

    destination_bus->length() / static_cast<double>(sampleRate());
    accumulated_silence_time_.store(silence_time, std::memory_order_relaxed);
    Michael Wilson . resolved
    Maybe using `fetch_add` here would be slightly safer, since we wouldn't have any gap between the load and store:
    ```suggestion
    const double increment = destination_bus->length() / static_cast<double>(sampleRate());
    silence_time = accumulated_silence_time_.fetch_add(increment, std::memory_order_relaxed) + increment;
    ```
    Hongchan Choi

    There are two reasons we did not use fetch_add here:

    1. `accumulated_silence_time_` is a `std::atomic<double>` (see below)
    2. There is no race condition here. The main thread only writes to it in `ClearAudibilityState()`, but `ClearAudibilityState()` is only called after the audio thread is synchronously stopped (via `StopRendering()`)

    ---
    Re: std::atomic<double> in C++20

    If a CPU architecture does not natively support atomic floating-point instructions (which is common for 64-bit doubles on 32-bit platforms, or certain ARM processors), the compiler/standard library implements fetch_add by wrapping the operation in an internal spinlock or mutex (falling back to libatomic).

    Line 1706, Patchset 6: DeferredTaskHandler::GraphAutoLocker locker(GetDeferredTaskHandler());
    Michael Wilson . resolved

    What is holding the graph lock here guarding against?

    It seems like all the variables being modified in this block are atomics, which are not guarded in other usages by the graph lock. Would it make sense to not hold the lock here at all, and just rely on the atomic variables?

    Hongchan Choi

    Done. Good catch!

    Line 2285, Patchset 6: media_player_receiver_.reset();
    Michael Wilson . unresolved

    Is resetting the media player receiver related to the rest of the change?

    Hongchan Choi

    It is related to the overall Mojo interaction cleanup we are doing for the AudioContext lifecycle, but I can take this out of this CL. Let me know.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Wilson
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
    Gerrit-Change-Number: 8009971
    Gerrit-PatchSet: 9
    Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
    Gerrit-Attention: Michael Wilson <mjwi...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 Jul 2026 17:02:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Michael Wilson <mjwi...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Wilson (Gerrit)

    unread,
    Jul 16, 2026, 2:42:25 PM (5 days ago) Jul 16
    to Hongchan Choi, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
    Attention needed from Hongchan Choi

    Michael Wilson added 3 comments

    File third_party/blink/renderer/modules/webaudio/audio_context.cc
    Line 1662, Patchset 6: accumulated_silence_time_.store(0.0, std::memory_order_relaxed);
    Michael Wilson . unresolved

    Should we report or cache any accumulated silence time before setting back to 0? I'm thinking of a scenario where this is the first audible buffer after several silent buffers; in that case will we properly report the silence or will it be lost?

    Hongchan Choi

    By design, this hysteresis is strictly for tracking audibility metrics (unlike dynamic range processors like gates or expanders that manipulate the audio signal). I propose keeping it simple by resetting it back to 0.

    Michael Wilson

    Sorry, I don't understand this response. Are you saying it's fine if the metrics are not accurate? Can we quantify how much inaccuracy is acceptable?

    One specific concern I have is that it seems like this metric is used for MEI calculations. If we are under-reporting silence could it possibly artificially inflate the MEI, and thus allow sites to autoplay media that otherwise would not be able to?

    Line 1664, Patchset 6: silence_time = accumulated_silence_time_.load(std::memory_order_relaxed) +
    destination_bus->length() / static_cast<double>(sampleRate());
    accumulated_silence_time_.store(silence_time, std::memory_order_relaxed);
    Michael Wilson . resolved
    Maybe using `fetch_add` here would be slightly safer, since we wouldn't have any gap between the load and store:
    ```suggestion
    const double increment = destination_bus->length() / static_cast<double>(sampleRate());
    silence_time = accumulated_silence_time_.fetch_add(increment, std::memory_order_relaxed) + increment;
    ```
    Hongchan Choi

    There are two reasons we did not use fetch_add here:

    1. `accumulated_silence_time_` is a `std::atomic<double>` (see below)
    2. There is no race condition here. The main thread only writes to it in `ClearAudibilityState()`, but `ClearAudibilityState()` is only called after the audio thread is synchronously stopped (via `StopRendering()`)

    ---
    Re: std::atomic<double> in C++20

    If a CPU architecture does not natively support atomic floating-point instructions (which is common for 64-bit doubles on 32-bit platforms, or certain ARM processors), the compiler/standard library implements fetch_add by wrapping the operation in an internal spinlock or mutex (falling back to libatomic).

    Michael Wilson

    Looks reasonable to me, thanks.

    Line 2285, Patchset 6: media_player_receiver_.reset();
    Michael Wilson . resolved

    Is resetting the media player receiver related to the rest of the change?

    Hongchan Choi

    It is related to the overall Mojo interaction cleanup we are doing for the AudioContext lifecycle, but I can take this out of this CL. Let me know.

    Michael Wilson

    I don't feel strongly about this. If it's related to the change we can keep it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongchan Choi
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
    Gerrit-Change-Number: 8009971
    Gerrit-PatchSet: 9
    Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
    Gerrit-Attention: Hongchan Choi <hong...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 Jul 2026 18:42:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Wilson <mjwi...@chromium.org>
    Comment-In-Reply-To: Hongchan Choi <hong...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hongchan Choi (Gerrit)

    unread,
    Jul 16, 2026, 7:00:46 PM (5 days ago) Jul 16
    to Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
    Attention needed from Michael Wilson

    Hongchan Choi added 1 comment

    File third_party/blink/renderer/modules/webaudio/audio_context.cc
    Line 1662, Patchset 6: accumulated_silence_time_.store(0.0, std::memory_order_relaxed);
    Michael Wilson . unresolved

    Should we report or cache any accumulated silence time before setting back to 0? I'm thinking of a scenario where this is the first audible buffer after several silent buffers; in that case will we properly report the silence or will it be lost?

    Hongchan Choi

    By design, this hysteresis is strictly for tracking audibility metrics (unlike dynamic range processors like gates or expanders that manipulate the audio signal). I propose keeping it simple by resetting it back to 0.

    Michael Wilson

    Sorry, I don't understand this response. Are you saying it's fine if the metrics are not accurate? Can we quantify how much inaccuracy is acceptable?

    One specific concern I have is that it seems like this metric is used for MEI calculations. If we are under-reporting silence could it possibly artificially inflate the MEI, and thus allow sites to autoplay media that otherwise would not be able to?

    Hongchan Choi

    I think that the current hysteresis design is the right trade-off for the following reasons:

    1. The `IsAudible()` helper is a simple energy detector (energy > 0) to keep the real-time audio thread fast and lock-free. It does not perform psychoacoustic human-audibility checks. As a result, any page can already trivially fake audibility and inflate its MEI score by streaming a continuous inaudible signal (e.g., a constant 0.5 DC offset or a sub-audible 5 Hz sine wave) for 7 seconds. The proposed hysteresis does not introduce any new exploit vectors that do not already exist.

    2. The MEI score and database are maintained **locally** on the user's profile to make local autoplay decisions. They are not uploaded to a global telemetry server or aggregated to modify global autoplay permissions, so any potential local inaccuracy remains isolated to that specific client session.

    3. In cases of rapid audibility micro-toggling, this hysteresis solves a severe thread contention issue by eliminating up to a few thousands Mojo IPCs/sec. The CPU overhead and threat to audio thread real-time safety are significantly reduced, which I believe outweighs the theoretical risk of minor engagement index inflation.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Wilson
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
    Gerrit-Change-Number: 8009971
    Gerrit-PatchSet: 9
    Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
    Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
    Gerrit-Attention: Michael Wilson <mjwi...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 Jul 2026 23:00:29 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Wilson (Gerrit)

    unread,
    Jul 16, 2026, 8:01:54 PM (5 days ago) Jul 16
    to Hongchan Choi, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
    Attention needed from Hongchan Choi

    Michael Wilson voted and added 1 comment

    Votes added by Michael Wilson

    Code-Review+1

    1 comment

    File third_party/blink/renderer/modules/webaudio/audio_context.cc
    Line 1662, Patchset 6: accumulated_silence_time_.store(0.0, std::memory_order_relaxed);
    Michael Wilson . resolved

    Should we report or cache any accumulated silence time before setting back to 0? I'm thinking of a scenario where this is the first audible buffer after several silent buffers; in that case will we properly report the silence or will it be lost?

    Hongchan Choi

    By design, this hysteresis is strictly for tracking audibility metrics (unlike dynamic range processors like gates or expanders that manipulate the audio signal). I propose keeping it simple by resetting it back to 0.

    Michael Wilson

    Sorry, I don't understand this response. Are you saying it's fine if the metrics are not accurate? Can we quantify how much inaccuracy is acceptable?

    One specific concern I have is that it seems like this metric is used for MEI calculations. If we are under-reporting silence could it possibly artificially inflate the MEI, and thus allow sites to autoplay media that otherwise would not be able to?

    Hongchan Choi

    I think that the current hysteresis design is the right trade-off for the following reasons:

    1. The `IsAudible()` helper is a simple energy detector (energy > 0) to keep the real-time audio thread fast and lock-free. It does not perform psychoacoustic human-audibility checks. As a result, any page can already trivially fake audibility and inflate its MEI score by streaming a continuous inaudible signal (e.g., a constant 0.5 DC offset or a sub-audible 5 Hz sine wave) for 7 seconds. The proposed hysteresis does not introduce any new exploit vectors that do not already exist.

    2. The MEI score and database are maintained **locally** on the user's profile to make local autoplay decisions. They are not uploaded to a global telemetry server or aggregated to modify global autoplay permissions, so any potential local inaccuracy remains isolated to that specific client session.

    3. In cases of rapid audibility micro-toggling, this hysteresis solves a severe thread contention issue by eliminating up to a few thousands Mojo IPCs/sec. The CPU overhead and threat to audio thread real-time safety are significantly reduced, which I believe outweighs the theoretical risk of minor engagement index inflation.

    Michael Wilson

    I don't want to block the CL on this. We can discuss offline and land a follow-up if necessary.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hongchan Choi
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
      Gerrit-Change-Number: 8009971
      Gerrit-PatchSet: 9
      Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
      Gerrit-Attention: Hongchan Choi <hong...@chromium.org>
      Gerrit-Comment-Date: Fri, 17 Jul 2026 00:01:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Michael Wilson (Gerrit)

      unread,
      Jul 17, 2026, 4:29:42 PM (4 days ago) Jul 17
      to Hongchan Choi, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
      Attention needed from Hongchan Choi

      Michael Wilson voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hongchan Choi
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
      Gerrit-Change-Number: 8009971
      Gerrit-PatchSet: 10
      Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
      Gerrit-Attention: Hongchan Choi <hong...@chromium.org>
      Gerrit-Comment-Date: Fri, 17 Jul 2026 20:29:32 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Hongchan Choi (Gerrit)

      unread,
      Jul 20, 2026, 10:45:23 AM (yesterday) Jul 20
      to Nate Chapin, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
      Attention needed from Nate Chapin

      Hongchan Choi added 1 comment

      Patchset-level comments
      File-level comment, Patchset 10 (Latest):
      Hongchan Choi . resolved

      japhet@ PTAL at features.*

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Nate Chapin
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
      Gerrit-Change-Number: 8009971
      Gerrit-PatchSet: 10
      Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
      Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
      Gerrit-Attention: Nate Chapin <jap...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Jul 2026 14:45:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Nate Chapin (Gerrit)

      unread,
      Jul 20, 2026, 12:40:05 PM (yesterday) Jul 20
      to Hongchan Choi, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org
      Attention needed from Hongchan Choi

      Nate Chapin voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hongchan Choi
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
      Gerrit-Change-Number: 8009971
      Gerrit-PatchSet: 10
      Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
      Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
      Gerrit-Attention: Hongchan Choi <hong...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Jul 2026 16:39:52 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Hongchan Choi (Gerrit)

      unread,
      Jul 20, 2026, 1:04:25 PM (yesterday) Jul 20
      to Nate Chapin, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org

      Hongchan Choi voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
      Gerrit-Change-Number: 8009971
      Gerrit-PatchSet: 10
      Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
      Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Jul 2026 17:04:14 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jul 20, 2026, 2:26:18 PM (yesterday) Jul 20
      to Hongchan Choi, Nate Chapin, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [WebAudio] Implement 2-second hysteresis for audibility IPCs

      This CL implements a 2.0-second silence hysteresis for the
      AudioContext audibility notifications to the browser process.
      Previously, rapid transitions between audible and silent states
      could result in excessive Mojo IPC traffic (up to ~2,600 IPCs/sec),
      leading to thread contention and high CPU usage.

      Changes:
      - Added a 2.0-second silence threshold (`kSilenceThresholdSeconds`).
      - Delayed the "stopped rendering audible audio" IPC by the threshold
      duration. If audio becomes audible again before the threshold
      expires, the silence timer is reset and no Mojo IPC is dispatched.
      - Passed the silence duration as a parameter to
      `NotifyAudibleAudioStopped` to allow the browser to accurately
      subtract the silence window from the total audible duration.
      - Declared audibility tracking member variables (`was_audible_` and
      `accumulated_silence_time_`) as `std::atomic` using relaxed memory
      ordering to prevent C++ concurrency problems between the real-time
      audio thread and main thread.
      - Added comprehensive unit tests in `audio_context_test.cc`.

      TAG=agy
      CONV=6ca652b0-350c-465c-bcef-c928a2dab54a
      Bug: 534828221
      Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
      Reviewed-by: Nate Chapin <jap...@chromium.org>
      Commit-Queue: Hongchan Choi <hong...@chromium.org>
      Reviewed-by: Michael Wilson <mjwi...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1664813}
      Files:
      • M third_party/blink/common/features.cc
      • M third_party/blink/public/common/features.h
      • M third_party/blink/renderer/modules/webaudio/audio_context.cc
      • M third_party/blink/renderer/modules/webaudio/audio_context.h
      • M third_party/blink/renderer/modules/webaudio/audio_context_test.cc
      Change size: L
      Delta: 5 files changed, 459 insertions(+), 15 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Michael Wilson, +1 by Nate Chapin
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1f60cf61141176cbca79fe887b93986e0f17f225
      Gerrit-Change-Number: 8009971
      Gerrit-PatchSet: 11
      Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
      Gerrit-Reviewer: Michael Wilson <mjwi...@chromium.org>
      Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages