mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 04:27:41 +00:00
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
@ -402,7 +402,8 @@ void WeakMap<K, V>::checkAfterMovingGC() const {
|
||||
gc::Cell* value = gc::ToMarkable(r.front().value());
|
||||
CheckGCThingAfterMovingGC(key);
|
||||
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());
|
||||
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…
x
Reference in New Issue
Block a user