diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /js/src/vm/EnvironmentObject.cpp | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/vm/EnvironmentObject.cpp')
-rw-r--r-- | js/src/vm/EnvironmentObject.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/js/src/vm/EnvironmentObject.cpp b/js/src/vm/EnvironmentObject.cpp index 008cfca260..0d5f214f53 100644 --- a/js/src/vm/EnvironmentObject.cpp +++ b/js/src/vm/EnvironmentObject.cpp @@ -2613,18 +2613,20 @@ void DebugEnvironments::checkHashTablesAfterMovingGC() { * This is called at the end of StoreBuffer::mark() to check that our * postbarriers have worked and that no hashtable keys (or values) are left * pointing into the nursery. + * + * |proxiedEnvs| is checked automatically because it is a WeakMap. */ - proxiedEnvs.checkAfterMovingGC(); - for (MissingEnvironmentMap::Range r = missingEnvs.all(); !r.empty(); - r.popFront()) { - CheckGCThingAfterMovingGC(r.front().key().scope()); + CheckTableAfterMovingGC(missingEnvs, [this](const auto& entry) { + CheckGCThingAfterMovingGC(entry.key().scope(), zone()); // Use unbarrieredGet() to prevent triggering read barrier while collecting. - CheckGCThingAfterMovingGC(r.front().value().unbarrieredGet()); - } - for (LiveEnvironmentMap::Range r = liveEnvs.all(); !r.empty(); r.popFront()) { - CheckGCThingAfterMovingGC(r.front().key()); - CheckGCThingAfterMovingGC(r.front().value().scope_.get()); - } + CheckGCThingAfterMovingGC(entry.value().unbarrieredGet(), zone()); + return entry.key(); + }); + CheckTableAfterMovingGC(liveEnvs, [this](const auto& entry) { + CheckGCThingAfterMovingGC(entry.key(), zone()); + CheckGCThingAfterMovingGC(entry.value().scope_.get(), zone()); + return entry.key().unbarrieredGet(); + }); } #endif |