Bug 1440740 - Calling PropTypes validators directly is not supported when first opening Memory Tool r?nchevobbe draft
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Mon, 26 Feb 2018 16:58:21 +0000
changeset 760260 c00dc38d5ebf03c27988d448da5f4d2908cb7598
parent 760185 580d833df9c44acec686a9fb88b5f27e9d29f68d
push id100594
push userbmo:mratcliffe@mozilla.com
push dateTue, 27 Feb 2018 08:56:15 +0000
reviewersnchevobbe
bugs1440740
milestone60.0a1
Bug 1440740 - Calling PropTypes validators directly is not supported when first opening Memory Tool r?nchevobbe Fix eslint errors (unused vars) MozReview-Commit-ID: IunuZlHIY1S
devtools/client/memory/models.js
--- a/devtools/client/memory/models.js
+++ b/devtools/client/memory/models.js
@@ -377,17 +377,17 @@ let previousViewModel = exports.previous
 
   // The previous diffing state, if any.
   diffing: diffingModel,
 
   // The previously selected snapshot, if any.
   selected: snapshotId,
 });
 
-let viewModel = exports.view = PropTypes.shape({
+exports.view = PropTypes.shape({
   // The current view state.
   state: catchAndIgnore(function (view) {
     switch (view.state) {
       case viewState.DIFFING:
       case viewState.CENSUS:
       case viewState.DOMINATOR_TREE:
       case viewState.INDIVIDUALS:
       case viewState.TREE_MAP:
@@ -481,18 +481,16 @@ exports.app = {
   // If present, the current diffing state.
   diffing: diffingModel,
 
   // If present, the current individuals state.
   individuals: individualsModel,
 
   // The current type of view.
   view: function (app) {
-    viewModel.isRequired(app, "view");
-
     catchAndIgnore(function (app) {
       switch (app.view.state) {
         case viewState.DIFFING:
           assert(app.diffing, "Should be diffing");
           break;
 
         case viewState.INDIVIDUALS:
         case viewState.CENSUS: