Bug 792503 followup, fix some code style issues and switch to for-of. r=dao

--HG--
extra : rebase_source : 0f0dbfccd50a1709c9b5643d89b53198aa0f5ade
This commit is contained in:
Jared Wein 2012-10-11 18:35:42 -07:00
parent fcd1ce5c84
commit 224cde34d4

View File

@ -589,12 +589,12 @@ var SocialMenu = {
populate: function SocialMenu_populate() {
// This menu is only accessible through keyboard navigation.
let submenu = document.getElementById("menu_socialAmbientMenuPopup");
while(submenu.hasChildNodes())
submenu.removeChild(submenu.firstChild);
while (submenu.hasChildNodes())
submenu.removeChild(submenu.firstChild);
let provider = Social.provider;
if (Social.active && provider) {
let iconNames = Object.keys(provider.ambientNotificationIcons);
for each(let name in iconNames) {
for (let name of iconNames) {
let icon = provider.ambientNotificationIcons[name];
if (!icon.label || !icon.menuURL)
continue;