commit 1e92198df8e0dbfc1d6226e9db05769ab1439f6a
parent db7c9796b2a43c3c65e3c4feae9c8da1242022f8
Author: Artur Iunusov <aiunusov@mozilla.com>
Date: Mon, 8 Dec 2025 09:52:37 +0000
Bug 1990233 - FIX MOZ_DIAGNOSTIC_ASSERT(!mWhen.IsNull()), r=smaug
- WorkerPrivate::FreezeInternal(): TimeoutManager Suspend() -->Freeze()
- WorkerPrivate::ThawInternal(): TimeoutManager Thaw() -->Resume()
Differential Revision: https://phabricator.services.mozilla.com/D273409
Diffstat:
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
@@ -4774,6 +4774,7 @@ bool WorkerPrivate::FreezeInternal() {
data->mScope ? data->mScope->GetTimeoutManager() : nullptr;
if (timeoutManager) {
timeoutManager->Suspend();
+ timeoutManager->Freeze();
}
return true;
@@ -4794,23 +4795,24 @@ bool WorkerPrivate::ThawInternal() {
// BindRemoteWorkerDebuggerChild();
+ data->mFrozen = false;
+
+ auto* timeoutManager =
+ data->mScope ? data->mScope->GetTimeoutManager() : nullptr;
+ if (timeoutManager) {
+ timeoutManager->Thaw();
+ timeoutManager->Resume();
+ }
+
for (uint32_t index = 0; index < data->mChildWorkers.Length(); index++) {
data->mChildWorkers[index]->Thaw(nullptr);
}
- data->mFrozen = false;
-
// The worker can thaw even if it failed to run (and doesn't have a global).
if (data->mScope) {
data->mScope->MutableClientSourceRef().Thaw();
}
- auto* timeoutManager =
- data->mScope ? data->mScope->GetTimeoutManager() : nullptr;
- if (timeoutManager) {
- timeoutManager->Resume();
- }
-
return true;
}