ported from UXP: Make WeakRef support always enabled (6861bedf)

This commit is contained in:
2026-05-20 10:22:32 +08:00
parent 25d353174e
commit f2854c5a53
15 changed files with 244 additions and 56 deletions
+4
View File
@@ -1506,6 +1506,8 @@ CycleCollectedJSContext::AfterProcessTask(uint32_t aRecursionDepth)
// Step 4.2 Execute any events that were waiting for a stable state.
ProcessStableStateQueue();
JS::ClearWeakRefKeptObjects(mJSContext);
}
void
@@ -1544,6 +1546,8 @@ CycleCollectedJSContext::AfterProcessMicrotasks()
});
RunInStableState(cleanupRunnable.forget());
};
JS::ClearWeakRefKeptObjects(mJSContext);
}
uint32_t