mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
[DOM] Hold a strong ref to VoiceData in nsSynthVoiceRegistry::RemoveVoice.
This commit is contained in:
@@ -325,12 +325,12 @@ nsSynthVoiceRegistry::RemoveVoice(nsISpeechService* aService,
|
||||
(XRE_IsContentProcess()) ? "child" : "parent"));
|
||||
|
||||
bool found = false;
|
||||
VoiceData* retval = mUriVoiceMap.GetWeak(aUri, &found);
|
||||
RefPtr<VoiceData> retval = mUriVoiceMap.GetWeak(aUri, &found);
|
||||
|
||||
if(NS_WARN_IF(!(found))) {
|
||||
if(NS_WARN_IF(!found)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
if(NS_WARN_IF(!(aService == retval->mService))) {
|
||||
if(NS_WARN_IF(aService != retval->mService)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user