jenkins-bot has submitted this change and it was merged.
Change subject: Destroy WindowManagers in Context and Surface destructors
......................................................................
Destroy WindowManagers in Context and Surface destructors
WindowManagers are now destructible, so destroy them.
Bug: 69630
Change-Id: I392e001bc632637c5c100f3bc5f28a05518659e0
---
M src/ui/ve.ui.Context.js
M src/ui/ve.ui.Surface.js
2 files changed, 8 insertions(+), 5 deletions(-)
Approvals:
JGonera: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I392e001bc632637c5c100f3bc5f28a05518659e0
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits