Bug 1787001 - Fix leaking COM object. r=nalexander

`ComPtr` constructor increments the refcount when initializing with a raw COM pointer.

Differential Revision: https://phabricator.services.mozilla.com/D155525
This commit is contained in:
Nicholas Rishel 2022-08-24 22:32:02 +00:00
Родитель 7516af27de
Коммит f965aff863
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -664,8 +664,6 @@ static bool NotificationStillPresent(
HRESULT
ToastNotificationHandler::OnDismiss(IToastNotification* notification,
IToastDismissedEventArgs* aArgs) {
// AddRef as ComPtr doesn't own the object and shouldn't release.
notification->AddRef();
ComPtr<IToastNotification> comptrNotification(notification);
// Don't dismiss notifications when they are still in the action center. We
// can receive multiple dismiss events.