Codebase list gnome-shell-extension-appindicator / 4d5d416
Don't use for..in or for each..in loops This improves resilience against other code modifying Array.prototype. Fixes original issue in #48 Jonas Kümmerlin 9 years ago
2 changed file(s) with 4 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
771771 }, this._rootItemDisconnectHandlers)
772772
773773 // fill the menu for the first time
774 for each(let child in this._rootItem.get_children())
774 this._rootItem.get_children().forEach(function(child) {
775775 this._rootMenu.addMenuItem(MenuItemFactory.createItem(this, child))
776 }, this)
776777 },
777778
778779 _setOpenedSubmenu: function(submenu) {
283283 // build up the dictionary we feed into the variant later
284284 let changed = {}
285285
286 for each(let i in result) {
286 result.forEach(function(i) {
287287 changed[i.name] = i.value
288288
289289 proxy.set_cached_property(i.name, i.value)
290 }
290 })
291291
292292 // avoid any form of recursion
293293 GLib.idle_add(GLib.PRIORITY_DEFAULT, proxy.emit.bind(proxy, "g-properties-changed", new GLib.Variant("a{sv}", changed), []))