Quantcast
Many uses of secure snippets failing on TBC beta - WoWInterface
Thread Tools Display Modes
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
04-04-21, 03:01 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,269
Related to this?

https://github.com/Stanzilla/WoWUIBugs/issues/66
  Reply With Quote
04-12-21, 06:48 PM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 500
Today's patch seems to have fixed my issues with the secure environment.
  Reply With Quote

WoWInterface » PTR » PTR UI Bugs » Many uses of secure snippets failing on TBC beta

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off