mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-27 07:26:29 +00:00
Store the ScriptInterface& in ModuleLoader::Result
During hotloading the `ScriptRequest` was constructed from a `JSContext*`. That requires that already an other `ScriptRequest` is active. Which isn't always the case. Now The `ScriptRequest` is constructed from a `ScriptInterface&`. Storing a `ScriptInterface&` in the `ModuleLoader::Result` allows to remove the `m_Result` as it is retrieved from the `ScriptInterface`.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <vector>
|
||||
|
||||
class ScriptContext;
|
||||
class ScriptInterface;
|
||||
class ScriptRequest;
|
||||
|
||||
namespace Script
|
||||
@@ -166,8 +167,7 @@ public:
|
||||
void Resume();
|
||||
|
||||
private:
|
||||
JSContext* m_Cx;
|
||||
ModuleLoader& m_Loader;
|
||||
const ScriptInterface& m_Script;
|
||||
VfsPath m_ModulePath;
|
||||
Future m_Storage;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user