Bug 872576 - Stop using deprecated for each ... in. r=mleibovic

This commit is contained in:
Michael Boon 2013-07-18 10:31:51 -04:00
parent 9bff37c4e0
commit d7c06dea92
3 changed files with 6 additions and 5 deletions

View File

@ -994,7 +994,7 @@ var BrowserApp = {
getPreferences: function getPreferences(aPrefsRequest, aListen) {
let prefs = [];
for each (let prefName in aPrefsRequest.preferences) {
for (let prefName of aPrefsRequest.preferences) {
let pref = {
name: prefName,
type: "",
@ -2048,7 +2048,8 @@ var NativeWindow = {
}
// then check for any context menu items registered in the ui
for each (let item in this.items) {
for (let itemId of Object.keys(this.items)) {
let item = this.items[itemId];
if (!this._getMenuItemForId(item.id) && item.matches(element, aX, aY)) {
this.menuitems.push(item);
}
@ -6463,7 +6464,7 @@ var SearchEngines = {
formData.push({ name: escapedName, value: escapedValue });
break;
case "select-one":
for each (let option in el.options) {
for (let option of el.options) {
if (option.selected) {
formData.push({ name: escapedName, value: escapedValue });
break;

View File

@ -480,7 +480,7 @@ InternalPrompt.prototype = {
prompt.inProgress = false;
self._asyncPromptInProgress = false;
for each (let consumer in prompt.consumers) {
for (let consumer of prompt.consumers) {
if (!consumer.callback)
// Not having a callback means that consumer didn't provide it
// or canceled the notification

View File

@ -114,7 +114,7 @@ Sanitizer.prototype = {
// Clear "Never remember passwords for this site", which is not handled by
// the permission manager
var hosts = Services.logins.getAllDisabledHosts({})
for each (var host in hosts) {
for (var host of hosts) {
Services.logins.setLoginSavingEnabled(host, true);
}
},