B2G/gecko/browser/devtools/debugger/debugger-view.js
/**
   * Remember a simple hierarchy of parent->element->children.
   *
   * @param object aProperties
   *        Container for the parent, element and the associated value node.
   */
Remember a simple hierarchy of parent->element->children.
@param object aProperties
Container for the parent, element and the associated value node.
Remember a simple hierarchy of parent - > element - > children . @param object aProperties Container for the parent element and the associated value node .
function DVP__saveHierarchy(aProperties) {
    let parent = aProperties.parent;
    let element = aProperties.element;
    let valueLabel = aProperties.valueLabel;
    let store = aProperties.store || parent._children;
    if (!element || !store) {
      return;
    }
    let relation = {
      root: parent ? (parent._root || parent) : null,
      parent: parent || null,
      element: element,
      valueLabel: valueLabel,
      children: {}
    };
    store[element._identifier] = relation;
    element._root = relation.root;
    element._children = relation.children;
  }
function DVP__saveHierarchy ( aProperties ) { let parent = aProperties . parent ; let element = aProperties . element ; let valueLabel = aProperties . valueLabel ; let store = aProperties . store || parent . _children ; if ( ! element || ! store ) { return ; } let relation = { root : parent ? ( parent . _root || parent ) : null , parent : parent || null , element : element , valueLabel : valueLabel , children : { } } ; store [ element . _identifier ] = relation ; element . _root = relation . root ; element . _children = relation . children ; }
Remember a simple hierarchy of parent->element->children.
Remember a simple hierarchy of parent - > element - > children .
// Make sure we have a valid element and a children storage object.