forked from mirrors/gecko-dev
Bug 1894442 - Allow shared atoms zone when checking weakmap keys r=sfink
This was an over-strict assertion getting the weakmap key's zone, which can legitimately be the shared atoms zone. Differential Revision: https://phabricator.services.mozilla.com/D209204
This commit is contained in:
parent
6c78db7df6
commit
1789fc93d7
2 changed files with 8 additions and 1 deletions
|
|
@ -402,7 +402,8 @@ void WeakMap<K, V>::checkAfterMovingGC() const {
|
||||||
gc::Cell* value = gc::ToMarkable(r.front().value());
|
gc::Cell* value = gc::ToMarkable(r.front().value());
|
||||||
CheckGCThingAfterMovingGC(key);
|
CheckGCThingAfterMovingGC(key);
|
||||||
if (!allowKeysInOtherZones()) {
|
if (!allowKeysInOtherZones()) {
|
||||||
MOZ_RELEASE_ASSERT(key->zone() == zone() || key->zone()->isAtomsZone());
|
Zone* keyZone = key->zoneFromAnyThread();
|
||||||
|
MOZ_RELEASE_ASSERT(keyZone == zone() || keyZone->isAtomsZone());
|
||||||
}
|
}
|
||||||
CheckGCThingAfterMovingGC(value, zone());
|
CheckGCThingAfterMovingGC(value, zone());
|
||||||
auto ptr = lookupUnbarriered(r.front().key());
|
auto ptr = lookupUnbarriered(r.front().key());
|
||||||
|
|
|
||||||
6
js/src/jit-test/tests/gc/bug-1894442.js
Normal file
6
js/src/jit-test/tests/gc/bug-1894442.js
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
// |jit-test| --enable-symbols-as-weakmap-keys; skip-if: helperThreadCount() === 0 || getBuildConfiguration("release_or_beta")
|
||||||
|
evalInWorker(`
|
||||||
|
a = new WeakSet
|
||||||
|
a.add(Symbol.hasInstance)
|
||||||
|
gczeal(14)(0 .b)
|
||||||
|
`)
|
||||||
Loading…
Reference in a new issue