mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Improve safety on event handlers from windows
This commit is contained in:
@@ -868,8 +868,9 @@ DukValue ScriptEngine::ExecutePluginCall(
|
||||
return ExecutePluginCall(plugin, func, dukUndefined, args, isGameStateMutable);
|
||||
}
|
||||
|
||||
// Must pass plugin by-value, a JS function could destroy the original reference
|
||||
DukValue ScriptEngine::ExecutePluginCall(
|
||||
const std::shared_ptr<Plugin>& plugin, const DukValue& func, const DukValue& thisValue, const std::vector<DukValue>& args,
|
||||
std::shared_ptr<Plugin> plugin, const DukValue& func, const DukValue& thisValue, const std::vector<DukValue>& args,
|
||||
bool isGameStateMutable)
|
||||
{
|
||||
DukStackFrame frame(_context);
|
||||
|
||||
Reference in New Issue
Block a user