From b815d684accec00fc285d383de117ae640fee365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 3 Oct 2024 17:03:18 +0200 Subject: [PATCH] utils: Use an extra parameter for property injector constructor By adding parameters in commit 611690cc33 we ended up hiding the base object constructor parameter, and so the support for automatic disconnection on parent object destruction. Fixes: #2297 --- appIconsDecorator.js | 3 ++- utils.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/appIconsDecorator.js b/appIconsDecorator.js index 3746ded57..89afa3ef5 100644 --- a/appIconsDecorator.js +++ b/appIconsDecorator.js @@ -27,7 +27,8 @@ export class AppIconsDecorator { constructor() { this._signals = new Utils.GlobalSignalsHandler(); this._methodInjections = new Utils.InjectionsHandler(); - this._propertyInjections = new Utils.PropertyInjectionsHandler({allowNewProperty: true}); + this._propertyInjections = new Utils.PropertyInjectionsHandler( + null, {allowNewProperty: true}); this._indicators = new Set(); this._patchAppIcons(); diff --git a/utils.js b/utils.js index 900af5cdb..67b4d58e7 100644 --- a/utils.js +++ b/utils.js @@ -412,8 +412,8 @@ export class VFuncInjectionsHandler extends BasicHandler { * and restored */ export class PropertyInjectionsHandler extends BasicHandler { - constructor(params) { - super(); + constructor(parentObject, params) { + super(parentObject); this._params = params; }