mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-13 20:14:51 +00:00
CMapGeneratorWorker thread safety issue. Fixes #783.
VFS access moved to main thread, where random map scripts are preloaded and stored prior to use by the worker thread. Adds LoadGlobalScript to ScriptInterface, for evaluating script content in the global scope. This was SVN commit r9261.
This commit is contained in:
@@ -237,6 +237,14 @@ public:
|
||||
*/
|
||||
bool LoadScript(const VfsPath& filename, const std::wstring& code);
|
||||
|
||||
/**
|
||||
* Load and execute the given script in the global scope.
|
||||
* @param filename Name for debugging purposes (not used to load the file)
|
||||
* @param code JS code to execute
|
||||
* @return true on successful compilation and execution; false otherwise
|
||||
*/
|
||||
bool LoadGlobalScript(const VfsPath& filename, const std::wstring& code);
|
||||
|
||||
/**
|
||||
* Load and execute the given script in the global scope.
|
||||
* @return true on successful compilation and execution; false otherwise
|
||||
@@ -269,6 +277,9 @@ public:
|
||||
*/
|
||||
void DumpHeap();
|
||||
|
||||
/**
|
||||
* MaybeGC tries to determine whether garbage collection in cx's runtime would free up enough memory to be worth the amount of time it would take
|
||||
*/
|
||||
void MaybeGC();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user