зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1315922 - fix react/prop-types issues in client/memory;r=gregtatum
MozReview-Commit-ID: 7o1QhSNOKGi --HG-- extra : rebase_source : d34f954d26ded05ce3743147a22655a572a86cc0
This commit is contained in:
Родитель
5a11042662
Коммит
404131a959
|
@ -4,14 +4,34 @@
|
|||
"use strict";
|
||||
|
||||
const { isSavedFrame } = require("devtools/shared/DevToolsUtils");
|
||||
const { DOM: dom, createClass, createFactory } = require("devtools/client/shared/vendor/react");
|
||||
const {
|
||||
DOM: dom,
|
||||
createClass,
|
||||
createFactory,
|
||||
PropTypes
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { L10N, formatNumber, formatPercent } = require("../utils");
|
||||
const Frame = createFactory(require("devtools/client/shared/components/frame"));
|
||||
const { TREE_ROW_HEIGHT } = require("../constants");
|
||||
const models = require("../models");
|
||||
|
||||
module.exports = createClass({
|
||||
displayName: "CensusTreeItem",
|
||||
|
||||
propTypes: {
|
||||
arrow: PropTypes.any,
|
||||
depth: PropTypes.number.isRequired,
|
||||
diffing: models.app.diffing,
|
||||
expanded: PropTypes.bool.isRequired,
|
||||
focused: PropTypes.bool.isRequired,
|
||||
getPercentBytes: PropTypes.func.isRequired,
|
||||
getPercentCount: PropTypes.func.isRequired,
|
||||
inverted: PropTypes.bool,
|
||||
item: PropTypes.object.isRequired,
|
||||
onViewIndividuals: PropTypes.func.isRequired,
|
||||
onViewSourceInDebugger: PropTypes.func.isRequired,
|
||||
},
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
return this.props.item != nextProps.item
|
||||
|| this.props.depth != nextProps.depth
|
||||
|
|
|
@ -25,6 +25,7 @@ module.exports = createClass({
|
|||
item: PropTypes.object.isRequired,
|
||||
depth: PropTypes.number.isRequired,
|
||||
arrow: PropTypes.object,
|
||||
expanded: PropTypes.bool.isRequired,
|
||||
focused: PropTypes.bool.isRequired,
|
||||
getPercentSize: PropTypes.func.isRequired,
|
||||
onViewSourceInDebugger: PropTypes.func.isRequired,
|
||||
|
|
|
@ -114,6 +114,7 @@ module.exports = createClass({
|
|||
onViewSourceInDebugger: PropTypes.func.isRequired,
|
||||
onExpand: PropTypes.func.isRequired,
|
||||
onCollapse: PropTypes.func.isRequired,
|
||||
onFocus: PropTypes.func.isRequired,
|
||||
},
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
|
|
|
@ -14,7 +14,7 @@ const {
|
|||
getSavedCensus
|
||||
} = require("../utils");
|
||||
const { diffingState } = require("../constants");
|
||||
const { snapshot: snapshotModel } = require("../models");
|
||||
const { snapshot: snapshotModel, app: appModel } = require("../models");
|
||||
|
||||
module.exports = createClass({
|
||||
displayName: "SnapshotListItem",
|
||||
|
@ -25,6 +25,7 @@ module.exports = createClass({
|
|||
onDelete: PropTypes.func.isRequired,
|
||||
item: snapshotModel.isRequired,
|
||||
index: PropTypes.number.isRequired,
|
||||
diffing: appModel.diffing,
|
||||
},
|
||||
|
||||
render() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче