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



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

    objectManager: correct 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 has a bad typo in it, though: it confuses `objectPaths`
    (the list of all object paths) and `objectPath` (the object
    currently being processed this iteration of the loop).
    
    That leads to a failure to synthesize the interface removal
    events, and spew in the log.
    
    This commit corrects the objectPath/objectPaths confusion.

 js/misc/objectManager.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/misc/objectManager.js b/js/misc/objectManager.js
index 1ce4f8342..5dffaa130 100644
--- a/js/misc/objectManager.js
+++ b/js/misc/objectManager.js
@@ -236,7 +236,8 @@ var ObjectManager = new Lang.Class({
     _onNameVanished() {
         let objectPaths = Object.keys(this._objects);
         for (let i = 0; i < objectPaths.length; i++) {
-            let object = this._objects[objectPaths];
+            let objectPath = objectPaths[i];
+            let object = this._objects[objectPath];
 
             let interfaceNames = Object.keys(object);
             for (let j = 0; i < interfaceNames.length; i++) {


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