| author | Julien Desgats | 2013-01-20 13:46:59 (EST) |
|---|---|---|
| committer | Simon Bernard | 2013-02-26 11:34:18 (EST) |
| commit | ba70f77ce90c5b934b1e24f02a3e589ec63b9ac4 (patch) (side-by-side diff) | |
| tree | 922f03ca66363694a78d362e7106560d29476164 | |
| parent | df6dc1287375fca5905a5b999e0fe62d008f9d41 (diff) | |
| download | org.eclipse.koneki.ldt-ba70f77ce90c5b934b1e24f02a3e589ec63b9ac4.zip org.eclipse.koneki.ldt-ba70f77ce90c5b934b1e24f02a3e589ec63b9ac4.tar.gz org.eclipse.koneki.ldt-ba70f77ce90c5b934b1e24f02a3e589ec63b9ac4.tar.bz2 | |
Bug 396930: Prevent global access that may trigger metamethods
| -rw-r--r-- | libraries/luadbgpclient/debugger/init.lua | 2 | ||||
| -rw-r--r-- | libraries/luadbgpclient/debugger/util.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libraries/luadbgpclient/debugger/init.lua b/libraries/luadbgpclient/debugger/init.lua index 2f4530b..7e547ed 100644 --- a/libraries/luadbgpclient/debugger/init.lua +++ b/libraries/luadbgpclient/debugger/init.lua @@ -410,7 +410,7 @@ local function debugger_hook(event, line) end end -if jit then +if rawget(_G, "jit") then debugger_hook = function(event, line) local thread = corunning() or "main" if event == "call" then diff --git a/libraries/luadbgpclient/debugger/util.lua b/libraries/luadbgpclient/debugger/util.lua index f7cdaa3..82e495e 100644 --- a/libraries/luadbgpclient/debugger/util.lua +++ b/libraries/luadbgpclient/debugger/util.lua @@ -113,7 +113,7 @@ if _VERSION == "Lua 5.1" then end end - if jit then + if rawget(_G, "jit") then MainThread = { [1] = "main", -- as the raw thread object is used as table keys, provide a replacement. -- LuaJIT completely eliminates tail calls from stack, so get_script_level retunrs wrong result in this case |

