mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1147325 - Clear box model timer on markup view destroy. r=pbrosset
Prevents 'this._inspector.toolbox is null' spam in mochitest-dt
This commit is contained in:
parent
b75e920d56
commit
2cb62768de
@ -317,14 +317,16 @@ MarkupView.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_briefBoxModelTimer: null,
|
_briefBoxModelTimer: null,
|
||||||
_brieflyShowBoxModel: function(nodeFront) {
|
|
||||||
let win = this._frame.contentWindow;
|
|
||||||
|
|
||||||
|
_clearBriefBoxModelTimer: function() {
|
||||||
if (this._briefBoxModelTimer) {
|
if (this._briefBoxModelTimer) {
|
||||||
clearTimeout(this._briefBoxModelTimer);
|
clearTimeout(this._briefBoxModelTimer);
|
||||||
this._briefBoxModelTimer = null;
|
this._briefBoxModelTimer = null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_brieflyShowBoxModel: function(nodeFront) {
|
||||||
|
this._clearBriefBoxModelTimer();
|
||||||
this._showBoxModel(nodeFront);
|
this._showBoxModel(nodeFront);
|
||||||
|
|
||||||
this._briefBoxModelTimer = setTimeout(() => {
|
this._briefBoxModelTimer = setTimeout(() => {
|
||||||
@ -1379,6 +1381,7 @@ MarkupView.prototype = {
|
|||||||
// We ignore the promise that |_hideBoxModel| returns, since we should still
|
// We ignore the promise that |_hideBoxModel| returns, since we should still
|
||||||
// proceed with the rest of destruction if it fails.
|
// proceed with the rest of destruction if it fails.
|
||||||
this._hideBoxModel();
|
this._hideBoxModel();
|
||||||
|
this._clearBriefBoxModelTimer();
|
||||||
|
|
||||||
this._elt.removeEventListener("click", this._onMouseClick, false);
|
this._elt.removeEventListener("click", this._onMouseClick, false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user