зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1572271 - Part 1: Force a GC during the cleanup of antitracking tests since there is not enough idle time between these tests for GCs to kick in naturally; r=baku
This prevents a whole host of OOM issues from occurring intermittently when running these tests. Differential Revision: https://phabricator.services.mozilla.com/D42654 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ef1c0b40d8
Коммит
c5fe8bca85
|
@ -9,6 +9,18 @@
|
|||
|
||||
var gFeatures = undefined;
|
||||
|
||||
/**
|
||||
* Force garbage collection.
|
||||
*/
|
||||
function forceGC() {
|
||||
SpecialPowers.gc();
|
||||
SpecialPowers.forceShrinkingGC();
|
||||
SpecialPowers.forceCC();
|
||||
SpecialPowers.gc();
|
||||
SpecialPowers.forceShrinkingGC();
|
||||
SpecialPowers.forceCC();
|
||||
}
|
||||
|
||||
this.AntiTracking = {
|
||||
runTestInNormalAndPrivateMode(
|
||||
name,
|
||||
|
@ -605,6 +617,10 @@ this.AntiTracking = {
|
|||
if (cleanupFunction) {
|
||||
await cleanupFunction();
|
||||
}
|
||||
|
||||
// While running these tests we typically do not have enough idle time to do
|
||||
// GC reliably, so force it here.
|
||||
forceGC();
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -120,6 +120,11 @@ this.DynamicFPIHelper = {
|
|||
if (cleanupFunction) {
|
||||
await cleanupFunction();
|
||||
}
|
||||
|
||||
// While running these tests we typically do not have enough idle time to do
|
||||
// GC reliably, so force it here.
|
||||
/* import-globals-from antitracking_head.js */
|
||||
forceGC();
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
@ -335,6 +335,11 @@ this.PartitionedStorageHelper = {
|
|||
if (cleanupFunction) {
|
||||
await cleanupFunction();
|
||||
}
|
||||
|
||||
// While running these tests we typically do not have enough idle time to do
|
||||
// GC reliably, so force it here.
|
||||
/* import-globals-from antitracking_head.js */
|
||||
forceGC();
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
@ -123,6 +123,11 @@ this.StoragePrincipalHelper = {
|
|||
await cleanupFunction();
|
||||
}
|
||||
UrlClassifierTestUtils.cleanupTestTrackers();
|
||||
|
||||
// While running these tests we typically do not have enough idle time to do
|
||||
// GC reliably, so force it here.
|
||||
/* import-globals-from antitracking_head.js */
|
||||
forceGC();
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче