v8 allows us to enter an Isolate::scope multiple times in the same thread, so I widened it to our ScopeGuard as well.
Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 14 files). Show all
Unified · Split
| @@ -30,9 +30,12 @@ STATIC_SCRIPT_TYPES_INITIALIZER((+[](ScriptManager* manager){ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | STATIC_SCRIPT_INITIALIZER(+[](ScriptManager* manager){ |
| 32 | 32 | auto scriptEngine = manager->engine().get(); |
| 33 | + auto scopeGuard = scriptEngine->getScopeGuard(); | |
| 34 | + auto* sgp = scopeGuard.get(); | |
| 33 | 35 | |
| 34 | − scriptEngine->registerEnum("Render.RenderMethod",QMetaEnum::fromType<RenderScriptingInterface::RenderMethod>()); | |
| 35 | − scriptEngine->registerEnum("AntialiasingMode",QMetaEnum::fromType<AntialiasingSetupConfig::Mode>()); | |
| 36 | + | |
| 37 | + scriptEngine->registerEnum(sgp, "Render.RenderMethod",QMetaEnum::fromType<RenderScriptingInterface::RenderMethod>()); | |
| 38 | + scriptEngine->registerEnum(sgp, "AntialiasingMode",QMetaEnum::fromType<AntialiasingSetupConfig::Mode>()); | |
| 36 | 39 | }); |
| 37 | 40 | |
| 38 | 41 | RenderScriptingInterface* RenderScriptingInterface::getInstance() { |