mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 14:05:48 +00:00
SpiderMonkey 38 upgrade: 31/35
Remove workaround for crash when using multiple ctxts per runtime, this was fixed upstream. Patch by leper. Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=890243 and https://bugzilla.mozilla.org/show_bug.cgi?id=905926 This was SVN commit r18685.
This commit is contained in:
@@ -127,16 +127,12 @@ ScriptRuntime::ScriptRuntime(shared_ptr<ScriptRuntime> parentRuntime, int runtim
|
||||
// The whole heap-growth mechanism seems to work only for non-incremental GCs.
|
||||
// We disable it to make it more clear if full GCs happen triggered by this JSAPI internal mechanism.
|
||||
JS_SetGCParameter(m_rt, JSGC_DYNAMIC_HEAP_GROWTH, false);
|
||||
|
||||
m_dummyContext = JS_NewContext(m_rt, STACK_CHUNK_SIZE);
|
||||
ENSURE(m_dummyContext);
|
||||
|
||||
ScriptEngine::GetSingleton().RegisterRuntime(m_rt);
|
||||
}
|
||||
|
||||
ScriptRuntime::~ScriptRuntime()
|
||||
{
|
||||
JS_DestroyContext(m_dummyContext);
|
||||
JS_SetGCCallback(m_rt, nullptr, nullptr);
|
||||
JS_DestroyRuntime(m_rt);
|
||||
ENSURE(m_FinalizationListObjectIdCache.empty() && "Leak: Removing callback while some objects still aren't finalized!");
|
||||
|
||||
Reference in New Issue
Block a user