зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1529845 - Add a destroy for the MarkupContextMenu. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D20783
This commit is contained in:
Родитель
95d63e80b2
Коммит
a5505820e9
|
@ -36,6 +36,16 @@ class MarkupContextMenu {
|
|||
this.walker = this.inspector.walker;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.markup = null;
|
||||
this.inspector = null;
|
||||
this.selection = null;
|
||||
this.target = null;
|
||||
this.telemetry = null;
|
||||
this.toolbox = null;
|
||||
this.walker = null;
|
||||
}
|
||||
|
||||
show(event) {
|
||||
if (!(event.originalTarget instanceof Element) ||
|
||||
event.originalTarget.closest("input[type=text]") ||
|
||||
|
|
|
@ -2029,6 +2029,11 @@ MarkupView.prototype = {
|
|||
|
||||
this._hoveredContainer = null;
|
||||
|
||||
if (this._contextMenu) {
|
||||
this._contextMenu.destroy();
|
||||
this._contextMenu = null;
|
||||
}
|
||||
|
||||
if (this._eventDetailsTooltip) {
|
||||
this._eventDetailsTooltip.destroy();
|
||||
this._eventDetailsTooltip = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче