[gnome-shell/gnome-3-28] objectManager: correct other invalid index code in onNameVanished



commit 025f6eb68edece7b0321a6fb8d78a29a8846e2e8
Author: Ray Strode <rstrode redhat com>
Date:   Fri Aug 31 12:48:00 2018 -0400

    objectManager: correct other invalid index code in onNameVanished
    
    The object manager tries to synthesize interface removal
    events if the bus name of a remote object drops off the bus.
    
    The code had bad typos in it, though: it reuses the `i`
    index variable in its inner loop, where it should be using
    the `j` index variable.
    
    This commit corrects the i/j confusion.

 js/misc/objectManager.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/misc/objectManager.js b/js/misc/objectManager.js
index 5dffaa130..1442e3df8 100644
--- a/js/misc/objectManager.js
+++ b/js/misc/objectManager.js
@@ -240,8 +240,8 @@ var ObjectManager = new Lang.Class({
             let object = this._objects[objectPath];
 
             let interfaceNames = Object.keys(object);
-            for (let j = 0; i < interfaceNames.length; i++) {
-                let interfaceName = interfaceNames[i];
+            for (let j = 0; j < interfaceNames.length; j++) {
+                let interfaceName = interfaceNames[j];
 
                 if (object[interfaceName])
                     this._removeInterface(objectPath, interfaceName);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]