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:
Yves
2014-11-13 11:19:28 +00:00
parent 1a0f9b086e
commit c813a11427
7 changed files with 480 additions and 416 deletions
+2 -1
View File
@@ -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);