lua: attempt to use sandbox in callbacks.

This commit is contained in:
feos 2016-01-30 23:26:02 +03:00
parent 6f8bcc2be3
commit 7409a32658
5 changed files with 6 additions and 5 deletions

View File

@ -56,7 +56,9 @@ namespace BizHawk.Client.Common
public void Call(string name = null)
{
_function.Call(name);
LuaSandbox.Sandbox(() => {
_function.Call(name);
});
}
}
}

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Client.EmuHawk.tools.Lua
namespace BizHawk.Client.Common
{
public class EnvironmentSandbox
{

View File

@ -14,7 +14,6 @@ using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Client.EmuHawk.WinFormExtensions;
using BizHawk.Client.EmuHawk.ToolExtensions;
using BizHawk.Client.EmuHawk.tools.Lua;
namespace BizHawk.Client.EmuHawk
{

View File

@ -5,7 +5,7 @@ using System.Text;
using LuaInterface;
using System.Windows.Forms;
namespace BizHawk.Client.EmuHawk.tools.Lua
namespace BizHawk.Client.Common
{
class LuaSandbox
{

View File

@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using BizHawk.Client.Common;
using LuaInterface;
using BizHawk.Client.EmuHawk.tools.Lua;
namespace BizHawk.Client.EmuHawk
{