mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1154243 - Avoid calling QueryInterface in AudioChannelAgent::GetWindowVolume() unnecessarily; r=baku
This commit is contained in:
parent
0ff1159b21
commit
b077dbefae
@ -199,12 +199,11 @@ AudioChannelAgent::GetWindowVolume(float* aVolume)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aVolume);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(mWindow);
|
||||
if (!win) {
|
||||
if (!mWindow) {
|
||||
*aVolume = 1.0f;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aVolume = win->GetAudioGlobalVolume();
|
||||
*aVolume = mWindow->GetAudioGlobalVolume();
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user