// Test weak maps with keys in different zones, checking whether entries are // collected when we expect. The existance of CCWs from uncollected zones // keeps keys alive and prevents entries from being collected.
gczeal(0);
function mapSize(wm) { // Note: Using nondeterministicGetWeakMapKeys will create CCWs to the keys // if they are in a different compartment. return nondeterministicGetWeakMapSize(wm);
}
let keyZone = newGlobal({newCompartment: true});
let mapZone = newGlobal({newCompartment: true});
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.