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.
This commit is contained in:
Ray Strode 2018-08-31 12:48:00 -04:00 committed by Florian Müllner
parent c2e9e68df7
commit afc7925e3e

View File

@ -237,7 +237,8 @@ var ObjectManager = new Lang.Class({
_onNameVanished() { _onNameVanished() {
let objectPaths = Object.keys(this._objects); let objectPaths = Object.keys(this._objects);
for (let i = 0; i < objectPaths.length; i++) { 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); let interfaceNames = Object.keys(object);
for (let j = 0; i < interfaceNames.length; i++) { for (let j = 0; i < interfaceNames.length; i++) {