1
0
forked from mirrors/0ad

Adapt 0 A.D. to SpiderMonkey ESR 102

This follows the migration guide at:
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples

Based on patch by: wraitii
Differential Revision: https://code.wildfiregames.com/D5002
This commit is contained in:
Itms
2024-10-25 10:24:14 +02:00
parent 6a5488832e
commit cc72142205
13 changed files with 49 additions and 42 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ void ScriptContext::MaybeIncrementalGC(double delay)
// The sweeping actually frees memory and it does this in a background thread (if JS_USE_HELPER_THREADS is set).
// While the sweeping is happening we already run scripts again and produce new garbage.
const int GCSliceTimeBudget = 30; // Milliseconds an incremental slice is allowed to run
const js::SliceBudget GCSliceTimeBudget = js::SliceBudget(js::TimeBudget(30)); // Milliseconds an incremental slice is allowed to run
// Have a minimum time in seconds to wait between GC slices and before starting a new GC to distribute the GC
// load and to hopefully make it unnoticeable for the player. This value should be high enough to distribute