mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1231677 - verify the return of mDiscoveryTimer->Init, if it faild exit function with error code. r=jst
This commit is contained in:
parent
16c1e2b2cc
commit
e0946ac595
@ -576,18 +576,20 @@ MulticastDNSDeviceProvider::ForceDiscovery()
|
||||
MOZ_ASSERT(mMulticastDNS);
|
||||
|
||||
// if it's already discovering, extend existing discovery timeout.
|
||||
nsresult rv;
|
||||
if (mIsDiscovering) {
|
||||
Unused << mDiscoveryTimer->Cancel();
|
||||
|
||||
NS_WARN_IF(NS_FAILED(mDiscoveryTimer->Init(this,
|
||||
mDiscveryTimeoutMs,
|
||||
nsITimer::TYPE_ONE_SHOT)));
|
||||
if (NS_WARN_IF(NS_FAILED( rv = mDiscoveryTimer->Init(this,
|
||||
mDiscveryTimeoutMs,
|
||||
nsITimer::TYPE_ONE_SHOT)))) {
|
||||
return rv;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
StopDiscovery(NS_OK);
|
||||
|
||||
nsresult rv;
|
||||
if (NS_WARN_IF(NS_FAILED(rv = mMulticastDNS->StartDiscovery(
|
||||
NS_LITERAL_CSTRING(SERVICE_TYPE),
|
||||
mWrappedListener,
|
||||
|
Loading…
Reference in New Issue
Block a user