зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1910848 - Add support for pausing QM IO thread after finishing directory work; r=dom-storage-reviewers,hsingh,asuth
Differential Revision: https://phabricator.services.mozilla.com/D194176
This commit is contained in:
Родитель
52eedfef26
Коммит
103fa3cf0f
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/MozPromise.h"
|
||||
#include "mozilla/StaticPrefs_dom.h"
|
||||
#include "mozilla/dom/fs/TargetPtrHolder.h"
|
||||
#include "mozilla/dom/quota/OriginOperationCallbacks.h"
|
||||
#include "mozilla/dom/quota/QuotaManager.h"
|
||||
|
@ -98,6 +99,12 @@ void OriginOperationBase::RunImmediately() {
|
|||
*selfHolder->mQuotaManager)),
|
||||
CreateAndRejectBoolPromise);
|
||||
|
||||
uint32_t pauseOnIOThreadMs = StaticPrefs::
|
||||
dom_quotaManager_originOperations_pauseOnIOThreadMs();
|
||||
if (pauseOnIOThreadMs > 0) {
|
||||
PR_Sleep(PR_MillisecondsToInterval(pauseOnIOThreadMs));
|
||||
}
|
||||
|
||||
return BoolPromise::CreateAndResolve(true, __func__);
|
||||
})
|
||||
->Then(
|
||||
|
|
|
@ -3473,6 +3473,12 @@
|
|||
value: -1
|
||||
mirror: always
|
||||
|
||||
# A pref that is used to slow down origin operations for testing purposes.
|
||||
- name: dom.quotaManager.originOperations.pauseOnIOThreadMs
|
||||
type: RelaxedAtomicUint32
|
||||
value: 0
|
||||
mirror: always
|
||||
|
||||
# A pref that is used to enable testing features.
|
||||
- name: dom.quotaManager.testing
|
||||
type: SequentiallyConsistentAtomicBool
|
||||
|
|
Загрузка…
Ссылка в новой задаче