// Create a second realm in the same compartment so NukedAllRealms() is false. var g2 = newGlobal({sameCompartmentAs: this});
// Create a transplantable object.
let {object, transplant} = transplantableObject();
// Create a WeakRef targeting this object (stored unwrapped in zone's weakRefMap).
let wr = new WeakRef(object);
// Transplant the object to a new compartment. The original address becomes a CCW.
let g3 = newGlobal({newCompartment: true});
transplant(g3);
// nukeAllCCWs calls NukeCrossCompartmentWrappers with NukeAllReferences. // But NukedAllRealms returns false because g2's realm hasn't been nuked. // So nukeAll is false for the current compartment, and the outgoing CCW survives. // Then clearWeakRefTargets iterates the weakRefMap and hits nonCCWRealm() on the CCW.
nukeAllCCWs();
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.20 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.