View Single Post
11-25-15, 01:40 AM   #6
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
I figured out a workaround, which involves scanning the children of UIParent outside the secure environment and then pushing the frames onto a stack one by one if they are protected.

Attempting to insert something tainted into a table created in the secure environment is most likely what caused the problem. Since InterfaceOptionsFrame is a child of UIParent, it would be included in the table if the scan is done outside of combat. Why specifically Bagnon seemed to be the culprit, I'm not sure. But this solution works:

Lua Code:
  1. function ConsolePort:UpdateSecureFrameStack()
  2.     if not InCombatLockdown() then
  3.         for i, child in pairs({UIParent:GetChildren()}) do
  4.             if not child:IsForbidden() and child:IsProtected() then
  5.                 UIHandle:SetFrameRef("NewChild", child)
  6.                 UIHandle:Execute([[
  7.                     FrameStack[self:GetFrameRef("NewChild")] = true
  8.                 ]])
  9.             end
  10.         end
  11.     end
  12. end

Lua Code:
  1. -- Changed this to only scan a predefined table instead of creating a new one
  2. UIHandle:Execute([[
  3.     UpdateFrameStack = [=[
  4.         Nodes = wipe(Nodes)
  5.         for Frame in pairs(FrameStack) do
  6.             CurrentNode = Frame
  7.             self:Run(GetNodes)
  8.         end
  9.     ]=]
  10. ]])
__________________

Last edited by MunkDev : 11-25-15 at 01:46 AM.
  Reply With Quote