function comparator(d1, d2)
        {
            var hasChildren1 = !!d1.values;
            var hasChildren2 = !!d2.values;
            if (hasChildren1 !== hasChildren2)
                return hasChildren1 ? 1 : -1;
            return String.naturalOrderComparator(d1.name, d2.name);
        }
@param {!CanvasAgent.ResourceStateDescriptor} d1
@param {!CanvasAgent.ResourceStateDescriptor} d2
@return {number}