/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/** * A throbber that represents a subtree in the dominator tree that is actively * being incrementally loaded and fetched from the `HeapAnalysesWorker`.
*/ class DominatorTreeSubtreeFetchingClass extends Component { static get propTypes() { return {
depth: PropTypes.number.isRequired,
};
}
/** * A link to fetch and load more siblings in the dominator tree, when there are * already many loaded above.
*/ class DominatorTreeSiblingLinkClass extends Component { static get propTypes() { return {
depth: PropTypes.number.isRequired,
item: PropTypes.instanceOf(DominatorTreeLazyChildren).isRequired,
onLoadMoreSiblings: PropTypes.func.isRequired,
};
}
shouldComponentUpdate(nextProps) { // Safe to use referential equality here because all of our mutations on // dominator tree models use immutableUpdate in a persistent manner. The // exception to the rule are mutations of the expanded set, however we take // care that the dominatorTree model itself is still re-allocated when // mutations to the expanded set occur. Because of the re-allocations, we // can continue using referential equality here. returnthis.props.dominatorTree !== nextProps.dominatorTree;
}
this.props.onFocus(item);
},
renderItem: (item, depth, focused, arrow, expanded) => { if (item instanceof DominatorTreeLazyChildren) { if (item.isFirstChild()) { assert(
dominatorTree.state === dominatorTreeState.INCREMENTAL_FETCHING, "If we are displaying a throbber for loading a subtree, " + "then we should be INCREMENTAL_FETCHING those children right now"
); return DominatorTreeSubtreeFetching({
key: item.key(),
depth,
focused,
});
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.