docs: function(fn) {
        var visitedDumps = new WeakSet();
  
        function visit(dump) {
          if (visitedDumps.has(dump))
            return;
  
          // If this dumps owns another dump which hasn't been visited yet, then
          // wait for this dump to be visited later.
          if (dump.owns !== undefined && !visitedDumps.has(dump.owns.target))
            return;
  
          // If this dump's parent hasn't been visited yet, then wait for this
          // dump to be visited later.
          if (dump.parent !== undefined && !visitedDumps.has(dump.parent))
            return;
  
          // Actually visit the current memory allocator dump.
          fn.call(this, dump);
          visitedDumps.add(dump);
  
          // Visit owners after the dumps they own.
          dump.ownedBy.forEach(function(ownershipLink) {
            visit.call(this, ownershipLink.source);
          }, this);
  
          // Visit children after parents.
          dump.children.forEach(visit, this);
        }
  
        this.iterateAllRootAllocatorDumps(visit);
      }