[tbb-commits] [tor-browser] 28/46: Bug 1796901 - Clear realm incremental marking state at the start of GC rather than at the end r=jandem, a=dmeehan
gitolite role
git at cupani.torproject.org
Wed Nov 16 20:43:08 UTC 2022
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch base-browser-102.5.0esr-12.0-1
in repository tor-browser.
commit e958d81b62591126f64cf02e2b71270aa80fb3ab
Author: Jon Coppeard <jcoppeard at mozilla.com>
AuthorDate: Wed Oct 26 11:09:39 2022 +0000
Bug 1796901 - Clear realm incremental marking state at the start of GC rather than at the end r=jandem, a=dmeehan
GC can be aborted in several states and zones GCRuntime::finishCollection
doesn't always get called. It's easier to clear this state in a signle place at
the start.
Differential Revision: https://phabricator.services.mozilla.com/D160056
---
js/src/gc/GC.cpp | 7 ++++---
js/src/jit-test/tests/gc/bug-1796901.js | 4 ++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp
index d0865f5018fc..1c52119ccc8b 100644
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -2671,6 +2671,10 @@ void GCRuntime::beginMarkPhase(AutoGCSession& session) {
// the collecting arena lists.
zone->arenas.mergeArenasFromCollectingLists();
zone->arenas.moveArenasToCollectingLists();
+
+ for (RealmsInZoneIter realm(zone); !realm.done(); realm.next()) {
+ realm->clearAllocatedDuringGC();
+ }
}
if (rt->isBeingDestroyed()) {
@@ -2802,9 +2806,6 @@ void GCRuntime::finishCollection() {
for (GCZonesIter zone(this); !zone.done(); zone.next()) {
zone->changeGCState(Zone::Finished, Zone::NoGC);
zone->notifyObservingDebuggers();
- for (RealmsInZoneIter realm(zone); !realm.done(); realm.next()) {
- realm->clearAllocatedDuringGC();
- }
}
#ifdef JS_GC_ZEAL
diff --git a/js/src/jit-test/tests/gc/bug-1796901.js b/js/src/jit-test/tests/gc/bug-1796901.js
new file mode 100644
index 000000000000..081b5b8e6e30
--- /dev/null
+++ b/js/src/jit-test/tests/gc/bug-1796901.js
@@ -0,0 +1,4 @@
+// |jit-test| --no-threads
+gcslice(0);
+evalcx("lazy");
+abortgc();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list