Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155668

Change subject: Destroy WindowManagers in Context and Surface destructors
......................................................................

Destroy WindowManagers in Context and Surface destructors

WindowManagers are now destructible, so destroy them.

Change-Id: I392e001bc632637c5c100f3bc5f28a05518659e0
---
M src/ui/ve.ui.Context.js
M src/ui/ve.ui.Surface.js
2 files changed, 8 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/68/155668/1

diff --git a/src/ui/ve.ui.Context.js b/src/ui/ve.ui.Context.js
index 82ea4bc..d76a026 100644
--- a/src/ui/ve.ui.Context.js
+++ b/src/ui/ve.ui.Context.js
@@ -304,10 +304,12 @@
        this.inspectors.disconnect( this );
        this.menu.disconnect( this );
 
+       // Destroy inspectors WindowManager
+       this.inspectors.destroy();
+
        // Stop timers
        clearTimeout( this.afterContextChangeTimeout );
 
        this.$element.remove();
-       this.inspectors.$element.remove();
        return this;
 };
diff --git a/src/ui/ve.ui.Surface.js b/src/ui/ve.ui.Surface.js
index 7391ed1..4aa5eb7 100644
--- a/src/ui/ve.ui.Surface.js
+++ b/src/ui/ve.ui.Surface.js
@@ -103,13 +103,14 @@
        // Stop periodic history tracking in model
        this.model.stopHistoryTracking();
 
-       // Destroy the ce.Surface and the ui.Context
-       this.view.destroy();
-       this.context.destroy();
-
        // Disconnect events
        this.dialogs.disconnect( this );
 
+       // Destroy the ce.Surface, the ui.Context and the dialogs WindowManager
+       this.view.destroy();
+       this.context.destroy();
+       this.dialogs.destroy();
+
        // Remove DOM elements
        this.$element.remove();
        this.globalOverlay.$element.remove();

-- 
To view, visit https://gerrit.wikimedia.org/r/155668
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I392e001bc632637c5c100f3bc5f28a05518659e0
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to