From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- dom/indexedDB/test/unit/xpcshell-head-parent-process.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dom/indexedDB/test/unit/xpcshell-head-parent-process.js') diff --git a/dom/indexedDB/test/unit/xpcshell-head-parent-process.js b/dom/indexedDB/test/unit/xpcshell-head-parent-process.js index f6bd2608ef..840eef7908 100644 --- a/dom/indexedDB/test/unit/xpcshell-head-parent-process.js +++ b/dom/indexedDB/test/unit/xpcshell-head-parent-process.js @@ -56,7 +56,11 @@ if (!this.runTest) { if (testSteps.constructor.name === "AsyncFunction") { // Do run our existing cleanup function that would normally be called by // the generator's call to finishTest(). - registerCleanupFunction(resetTesting); + registerCleanupFunction(function () { + if (SpecialPowers.isMainProcess()) { + resetTesting(); + } + }); add_task(testSteps); @@ -644,7 +648,7 @@ var SpecialPowers = { clearUserPref(prefName) { Services.prefs.clearUserPref(prefName); }, - // Copied (and slightly adjusted) from testing/specialpowers/content/SpecialPowersAPI.jsm + // Copied (and slightly adjusted) from testing/specialpowers/api.js exactGC(callback) { let count = 0; -- cgit v1.2.3