Improve safety on event handlers from windows

This commit is contained in:
Ted John committed 2022-03-21 21:42:30 +00:00
1 parent 8f34029e89
commit 3864795a08
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -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);