Quantcast
WoWInterface - View Single Post - Many uses of secure snippets failing on TBC beta
View Single Post
04-04-21, 02:30 PM   #1
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 500
Many uses of secure snippets failing on TBC beta

On the BC beta:
Lua Code:
  1. local button = CreateFrame("Button", "SecureTest", UIParent, "SecureActionButtonTemplate")
  2. button:SetSize(36,36)
  3. button:SetPoint("CENTER")
  4. button:SetNormalTexture("Interface\\Icons\\INV_Misc_QuestionMark")
  5.  
  6. button:SetAttribute("type","spell")
  7. button:SetAttribute("spell","Life Tap")
Functions as expected.

Once you start getting snippets involved, such as:
Lua Code:
  1. local button = CreateFrame("Button", "SecureTest", UIParent, "SecureActionButtonTemplate")
  2. button:SetSize(36,36)
  3. button:SetPoint("CENTER")
  4. button:SetNormalTexture("Interface\\Icons\\INV_Misc_QuestionMark")
  5.  
  6. button:SetAttribute("type","spell")
  7. button:SetAttribute("spell","Life Tap")
  8.  
  9. SecureHandlerWrapScript(button, "OnClick", button, [[
  10.   print("click")
  11. ]])
It starts throwing errors like this:
Message: Interface\FrameXML\RestrictedExecution.lua:473: Cannot call restricted closure from insecure code
Time: Sun Apr 4 16:24:56 2021
Count: 2
Stack: Interface\FrameXML\RestrictedExecution.lua:473: Cannot call restricted closure from insecure code
[string "=[C]"]: ?
[string "@Interface\FrameXML\RestrictedExecution.lua"]:473: in function <Interface\FrameXML\RestrictedExecution.lua:447>
[string "=(tail call)"]: ?
[string "@Interface\FrameXML\SecureHandlers.lua"]:285: in function <Interface\FrameXML\SecureHandlers.lua:279>
[string "=(tail call)"]: ?

Locals: (*temporary) = "Cannot call restricted closure from insecure code"
My state drivers are failing with a similar issue. It seems like this is may be due to taint with beta debug code.
  Reply With Quote