From 58269399ff3ffded19db3821786f14c9e34e84db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 9 Jun 2022 05:07:15 +0200 Subject: signals: Use a Dict to associate connection IDs to objects We often reference connection IDs, so now we can use a more optimized native way to handle connections without having to iterate them all the times. This could have been implemented using the newer Map() object, but sadly it's still way slower than using normal objects. --- installed-tests/js/testSignals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'installed-tests') diff --git a/installed-tests/js/testSignals.js b/installed-tests/js/testSignals.js index dea3f41a..3779b277 100644 --- a/installed-tests/js/testSignals.js +++ b/installed-tests/js/testSignals.js @@ -67,7 +67,7 @@ function testSignals(klass) { `No signal connection ${firstId} found`); // poke in private implementation to sanity-check no handlers left - expect(foo._signalConnections.length).toEqual(0); + expect(Object.keys(foo._signalConnections).length).toEqual(0); }); it('distinguishes multiple signals', function () { -- cgit v1.2.1