From 74daab44a019a158dd17caa8549610919c3331fe Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 20 Dec 2019 14:47:28 +0000 Subject: [PATCH] Bug 1603902 - Remove a race condition where storage access would get denied when a delayed automatic grant is in progress; r=baku Differential Revision: https://phabricator.services.mozilla.com/D57211 --HG-- extra : moz-landing-system : lando --- dom/base/StorageAccessPermissionRequest.cpp | 2 -- dom/base/StorageAccessPermissionRequest.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dom/base/StorageAccessPermissionRequest.cpp b/dom/base/StorageAccessPermissionRequest.cpp index 25ccde4efa1c..801643337552 100644 --- a/dom/base/StorageAccessPermissionRequest.cpp +++ b/dom/base/StorageAccessPermissionRequest.cpp @@ -31,8 +31,6 @@ StorageAccessPermissionRequest::StorageAccessPermissionRequest( PermissionRequest(mType, nsTArray())); } -StorageAccessPermissionRequest::~StorageAccessPermissionRequest() { Cancel(); } - NS_IMETHODIMP StorageAccessPermissionRequest::Cancel() { if (!mCallbackCalled) { diff --git a/dom/base/StorageAccessPermissionRequest.h b/dom/base/StorageAccessPermissionRequest.h index 5af69c1afe00..4a2f9d251c1a 100644 --- a/dom/base/StorageAccessPermissionRequest.h +++ b/dom/base/StorageAccessPermissionRequest.h @@ -43,7 +43,7 @@ class StorageAccessPermissionRequest final nsIPrincipal* aNodePrincipal, AllowCallback&& aAllowCallback, CancelCallback&& aCancelCallback); - ~StorageAccessPermissionRequest(); + ~StorageAccessPermissionRequest() = default; unsigned CalculateSimulatedDelay();