Blame PrepareZoneForGC.patch

f2d453
diff -Nur 0ad-0.0.25b-alpha/source/scriptinterface/ScriptContext.cpp 0ad-0.0.25b-alpha-patched/source/scriptinterface/ScriptContext.cpp
f2d453
--- 0ad-0.0.25b-alpha/source/scriptinterface/ScriptContext.cpp	2021-07-27 23:56:58.000000000 +0200
f2d453
+++ 0ad-0.0.25b-alpha-patched/source/scriptinterface/ScriptContext.cpp	2021-12-30 16:58:57.749562521 +0100
f2d453
@@ -143,7 +143,7 @@
f2d453
 	// Schedule the zone for GC, which will destroy the realm.
f2d453
 	if (JS::IsIncrementalGCInProgress(m_cx))
f2d453
 		JS::FinishIncrementalGC(m_cx, JS::GCReason::API);
f2d453
-	JS::PrepareZoneForGC(js::GetRealmZone(realm));
f2d453
+	JS::PrepareZoneForGC(m_cx, js::GetRealmZone(realm));
f2d453
 	m_Realms.remove(realm);
f2d453
 }
f2d453
 
f2d453
@@ -261,5 +261,5 @@
f2d453
 void ScriptContext::PrepareZonesForIncrementalGC() const
f2d453
 {
f2d453
 	for (JS::Realm* const& realm : m_Realms)
f2d453
-		JS::PrepareZoneForGC(js::GetRealmZone(realm));
f2d453
+		JS::PrepareZoneForGC(m_cx, js::GetRealmZone(realm));
f2d453
 }