[webkit-reviews] review granted: [Bug 228589] [Catalina][GPUP] Some API tests fail after GPU Process features are enabled : [Attachment 434887] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 4 10:12:31 PDT 2021


Jer Noble <jer.noble at apple.com> has granted Peng Liu <peng.liu6 at apple.com>'s
request for review:
Bug 228589: [Catalina][GPUP] Some API tests fail after GPU Process features are
enabled
https://bugs.webkit.org/show_bug.cgi?id=228589

Attachment 434887: Patch

https://bugs.webkit.org/attachment.cgi?id=434887&action=review




--- Comment #10 from Jer Noble <jer.noble at apple.com> ---
Comment on attachment 434887
  --> https://bugs.webkit.org/attachment.cgi?id=434887
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434887&action=review

r=me, with nits:

> Source/WebCore/html/HTMLMediaElement.cpp:3813
> -void HTMLMediaElement::hardwareMutedStateDidChange(AudioSession* session)
> +void HTMLMediaElement::hardwareMutedStateDidChange(const AudioSession*
session)

If we're changing the signature here, can we change this to be a `const
AudioSession&` rather than a pointer?

> Source/WebCore/html/HTMLMediaElement.h:885
> -    void hardwareMutedStateDidChange(AudioSession*) final;
> +    void hardwareMutedStateDidChange(const AudioSession*) final;

Ditto.

> Source/WebCore/platform/audio/mac/AudioSessionMac.mm:140
> +void AudioSessionMac::handleSampleRateChange() const
> +{
> +    for (auto& observer : m_configurationChangeObservers)
> +	   observer.sampleRateDidChange(this);
> +}

I _think_ you want to use m_configurationChangeObservers.forEach() or for(... :
copyToVector(m_configurationChangeObservers)). The default iterator will skip
empty observers, but won't remove them.

> Source/WebCore/platform/audio/mac/AudioSessionMac.mm:188
> +    for (auto& observer : m_configurationChangeObservers)
> +	   observer.bufferSizeDidChange(this);

Ditto.

> Source/WebCore/platform/audio/mac/AudioSessionMac.mm:490
> +    for (auto& observer : m_configurationChangeObservers)
> +	   observer.hardwareMutedStateDidChange(this);

Ditto.


More information about the webkit-reviews mailing list