Bug 1865896 - Apply DefineEnum to AudioChannelService::AudibleState r=media-playback-reviewers,padenot

Note this patch changes the converted enum string from X to eX in the
logs, and free the crash caused by passing `AudibleState::eMaybeAudible`
to `ToAudibilityStr`

Depends on D213363

Differential Revision: https://phabricator.services.mozilla.com/D213364
This commit is contained in:
Chun-Min Chang
2024-07-31 16:32:18 +00:00
parent 1b6dd9abe6
commit 1b1e18f58f
5 changed files with 9 additions and 43 deletions

View File

@@ -1619,8 +1619,8 @@ class HTMLMediaElement::AudioChannelAgentCallback final
MOZ_LOG(AudioChannelService::GetAudioChannelLog(), LogLevel::Debug,
("HTMLMediaElement::AudioChannelAgentCallback, "
"NotifyAudioPlaybackChanged, this=%p, current=%s, new=%s",
this, AudibleStateToStr(mIsOwnerAudible),
AudibleStateToStr(newAudibleState)));
this, AudioChannelService::EnumValueToString(mIsOwnerAudible),
AudioChannelService::EnumValueToString(newAudibleState)));
if (mIsOwnerAudible == newAudibleState) {
return;
}