Issue MoonchildProductions/UXP#2306: Add pref-gated WeakRef with safe stub when disabled

* Add javascript.options.weakrefs and plumb it through context options, XPConnect, and workers
* Keep referents alive via strong tracing when the pref is off so deref() still returns the target
* Retain weak-edge semantics when the pref is enabled
This commit is contained in:
Basilisk-Dev 2025-12-17 16:35:41 -05:00 • committed by wuggy
commit 3cf82e2ca1
7 changed files with 32 additions and 8 deletions

View file

@ -1347,6 +1347,7 @@ pref("javascript.options.dynamicImport", true);
// Streams API
pref("javascript.options.streams", true);
pref("javascript.options.weakrefs", false);
// advanced prefs
pref("advanced.mailftp", false);