[pve-devel] [PATCH widget-toolkit 03/11] Toolkit: set clearPropertiesOnDestroy to false by default

Dominik Csapak d.csapak at proxmox.com
Wed May 26 10:58:31 CEST 2021


instead of the upstream default of 'async'

we do this since it creates some problems with our callbacks which can
happen during component destruction. The upstream reasoning does not
really makes sense for us normally, since we do not keep any references
around for most things, and thus the garbage collector can claim it.

note that this is only for components, Ext.Base sets it to 'true' by
default and we do not change this since we normally do not extend
from non-components

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/Toolkit.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/Toolkit.js b/src/Toolkit.js
index 6787173..a39f64d 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -662,6 +662,12 @@ Ext.define('Proxmox.selection.CheckboxModel', {
 // override the download server url globally, for privacy reasons
 Ext.draw.Container.prototype.defaultDownloadServerUrl = "-";
 
+// stop nulling of properties
+Ext.define('Proxmox.Component', {
+    override: 'Ext.Component',
+    clearPropertiesOnDestroy: false,
+});
+
 // force alert boxes to be rendered with an Error Icon
 // since Ext.Msg is an object and not a prototype, we need to override it
 // after the framework has been initiated
-- 
2.20.1





More information about the pve-devel mailing list