mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 697132 - Use nsCOMPtr constructor. r=Ms2ger
This commit is contained in:
parent
bb310a3fde
commit
0463d2d1c5
@ -972,8 +972,7 @@ Navigator::GetMozPower(nsIDOMMozPowerManager** aPower)
|
||||
mPowerManager->Init(win);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMMozPowerManager> power =
|
||||
do_QueryInterface(NS_ISUPPORTS_CAST(nsIDOMMozPowerManager*, mPowerManager));
|
||||
nsCOMPtr<nsIDOMMozPowerManager> power(mPowerManager);
|
||||
power.forget(aPower);
|
||||
|
||||
return NS_OK;
|
||||
|
@ -163,8 +163,7 @@ PowerManagerService::NewWakeLock(const nsAString &aTopic,
|
||||
nsresult rv = wakelock->Init(aTopic, aWindow);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMMozWakeLock> wl =
|
||||
do_QueryInterface(NS_ISUPPORTS_CAST(nsIDOMMozWakeLock*, wakelock));
|
||||
nsCOMPtr<nsIDOMMozWakeLock> wl(wakelock);
|
||||
wl.forget(aWakeLock);
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user