зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1797688 - Part 1: Remove unnecessary check for gXPCOMThreadsShutDown in the ReleasingTimerHolder. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D160619
This commit is contained in:
Родитель
bc818a8ce3
Коммит
f466a8ebee
|
@ -16,6 +16,7 @@
|
|||
#include "mozilla/dom/IPCBlobUtils.h"
|
||||
#include "mozilla/dom/MediaSource.h"
|
||||
#include "mozilla/ipc/IPCStreamUtils.h"
|
||||
#include "mozilla/AppShutdown.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
|
@ -396,14 +397,11 @@ class ReleasingTimerHolder final : public Runnable,
|
|||
|
||||
RefPtr<ReleasingTimerHolder> holder = new ReleasingTimerHolder(aURI);
|
||||
|
||||
// BlobURLProtocolHandler::RemoveDataEntry potentially happens late. We are
|
||||
// prepared to RevokeUri synchronously if we run after XPCOMWillShutdown,
|
||||
// but we need at least to be able to dispatch to the main thread here.
|
||||
auto raii = MakeScopeExit([holder] { holder->CancelTimerAndRevokeURI(); });
|
||||
|
||||
// ReleasingTimerHolder potentially dispatches after we've
|
||||
// shutdown the main thread, so guard agains that.
|
||||
if (NS_WARN_IF(gXPCOMThreadsShutDown)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsresult rv =
|
||||
SchedulerGroup::Dispatch(TaskCategory::Other, holder.forget());
|
||||
NS_ENSURE_SUCCESS_VOID(rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче