mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
Split ScriptRuntime and ScriptInterface code to separate files.
The runtime is becoming more and more important in the JSAPI. As a result, we also have more functionality on the runtime level and having the whole ScriptRuntime class hidden in ScriptInterface.cpp doesn't make sense anymore. ScriptInterface.cpp also has become quite a large file and pulling out the runtime part makes it a bit smaller. Refs #2462 This was SVN commit r15961.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "lib/external_libraries/enet.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "scriptinterface/ScriptInterface.h"
|
||||
#include "scriptinterface/ScriptRuntime.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
|
||||
@@ -391,7 +392,7 @@ bool CNetServerWorker::RunStep()
|
||||
// (Do as little work as possible while the mutex is held open,
|
||||
// to avoid performance problems and deadlocks.)
|
||||
|
||||
m_ScriptInterface->MaybeIncrementalRuntimeGC(0.5f);
|
||||
m_ScriptInterface->GetRuntime()->MaybeIncrementalGC(0.5f);
|
||||
|
||||
JSContext* cx = m_ScriptInterface->GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
|
||||
Reference in New Issue
Block a user