зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1604883 - Use background thread pool for Windows toast notifications. r=nalexander,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D142357
This commit is contained in:
Родитель
58566a1db9
Коммит
ce1de4107d
|
@ -41,12 +41,6 @@ nsresult ToastNotification::Init() {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult rv =
|
||||
NS_NewNamedThread("ToastBgThread", getter_AddRefs(mBackgroundThread));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> obsServ =
|
||||
mozilla::services::GetObserverService();
|
||||
if (obsServ) {
|
||||
|
@ -57,7 +51,7 @@ nsresult ToastNotification::Init() {
|
|||
}
|
||||
|
||||
nsresult ToastNotification::BackgroundDispatch(nsIRunnable* runnable) {
|
||||
return mBackgroundThread->Dispatch(runnable, NS_DISPATCH_NORMAL);
|
||||
return NS_DispatchBackgroundTask(runnable);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -42,7 +42,6 @@ class ToastNotification final : public nsIWindowsAlertsService,
|
|||
virtual ~ToastNotification();
|
||||
|
||||
nsRefPtrHashtable<nsStringHashKey, ToastNotificationHandler> mActiveHandlers;
|
||||
nsCOMPtr<nsIThread> mBackgroundThread;
|
||||
bool mSuppressForScreenSharing = false;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче