mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1094436 - Fix broken speech recognition requiring the wrong type of stream and leaking memory. r=jesup
This commit is contained in:
parent
3673d4f701
commit
3a0324940a
@ -940,11 +940,11 @@ NS_IMPL_ISUPPORTS(SpeechRecognition::GetUserMediaSuccessCallback, nsIDOMGetUserM
|
||||
NS_IMETHODIMP
|
||||
SpeechRecognition::GetUserMediaSuccessCallback::OnSuccess(nsISupports* aStream)
|
||||
{
|
||||
DOMLocalMediaStream *localStream = nullptr;
|
||||
nsresult rv = CallQueryInterface(aStream, &localStream);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mRecognition->StartRecording(localStream);
|
||||
nsRefPtr<DOMMediaStream> stream = do_QueryObject(aStream);
|
||||
if (!stream) {
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
mRecognition->StartRecording(stream);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user