return function(_, Instance)

local dirtyRect = Instance.dirtyRect
function Instance:dirtyRect()
    return Rect:new(dirtyRect(self))
end

-- NOTE: This only preserves a single return value from func.
function Instance:pcall(func)
    local result
    self:preserve(function(_)
        -- NOTE: This ignores the passed-in canvas since the canvas is closed in func.
        result = ezpcall(func)
    end)
    return result
end

end
