Bug 1344504 - handle rejected promise when showing/hiding box model in markup view;r=gl

MozReview-Commit-ID: C3aGIk1RUOU

--HG--
extra : rebase_source : ff5e3e8c3c9a66877bef723c1b274534300e25fc
This commit is contained in:
Julian Descottes 2017-03-15 08:44:31 +01:00
parent 541691a1f2
commit c690940c14

View File

@ -418,7 +418,8 @@ MarkupView.prototype = {
* requests queued up
*/
_showBoxModel: function (nodeFront) {
return this.toolbox.highlighterUtils.highlightNodeFront(nodeFront);
return this.toolbox.highlighterUtils.highlightNodeFront(nodeFront)
.catch(this._handleRejectionIfNotDestroyed);
},
/**
@ -431,7 +432,8 @@ MarkupView.prototype = {
* requests queued up
*/
_hideBoxModel: function (forceHide) {
return this.toolbox.highlighterUtils.unhighlight(forceHide);
return this.toolbox.highlighterUtils.unhighlight(forceHide)
.catch(this._handleRejectionIfNotDestroyed);
},
_briefBoxModelTimer: null,