mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 03:06:29 +00:00
Fix JS OOM in tests following aae417bd29
aae417bd29 made ScriptInterface not recreate a new JSContext since it
becomes a compartment wrapper, but that means we need to GC tests or
they might OOM.
To make it mostly seamless, GC on any test setup. The JS tests are
pretty close to the 16Mb limit as it stands so GC them manually too, for
good measure.
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3101
This was SVN commit r24182.
This commit is contained in:
@@ -94,6 +94,14 @@ class MiscSetup : public CxxTest::GlobalFixture
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool setUp()
|
||||
{
|
||||
// Clean up any JS leftover between tests.
|
||||
g_ScriptContext->ShrinkingGC();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// We're doing the initialization and shutdown of the ScriptEngine explicitly here
|
||||
|
||||
Reference in New Issue
Block a user