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:
phosit
2025-06-11 14:51:52 +02:00
committed by phosit
parent 25c53cb0ac
commit b8348bec55
3 changed files with 18 additions and 10 deletions
+2 -2
View File
@@ -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;
};