mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Bug 1571221 - Add a check for 'this.selection' before calling 'destroy()' on it r=gl
Added an if statement to check for `this.selection`. If it is truthy, `destroy()` will be called on it. Differential Revision: https://phabricator.services.mozilla.com/D40643 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
670447873a
commit
ce3d0217a4
@ -509,7 +509,9 @@ class InspectorFront extends FrontClassWithSpec(inspectorSpec) {
|
||||
destroy() {
|
||||
// Selection isn't a Front and so isn't managed by InspectorFront
|
||||
// and has to be destroyed manually
|
||||
this.selection.destroy();
|
||||
if (this.selection) {
|
||||
this.selection.destroy();
|
||||
}
|
||||
// Highlighter fronts are managed by InspectorFront and so will be
|
||||
// automatically destroyed. But we have to clear the `_highlighters`
|
||||
// Map as well as explicitly call `finalize` request on all of them.
|
||||
|
Loading…
Reference in New Issue
Block a user