Bug 1153671 - Part 3: Remove non-standard for-each-in from suite/. r=Ian,Ratty a=ewong

This commit is contained in:
Ravi Shankar 2015-06-24 08:56:00 +09:00
Родитель 98b82c859d
Коммит a6cf994e8f
11 изменённых файлов: 18 добавлений и 22 удалений

Просмотреть файл

@ -573,7 +573,7 @@ FeedHandlerInfo.prototype = {
if (converterSvc) {
// Add the registered web handlers. There can be any number of these.
var webHandlers = converterSvc.getContentHandlers(this.type, {});
for each (let webHandler in webHandlers)
for (let webHandler of webHandlers)
this._possibleApplicationHandlers.appendElement(webHandler, false);
}
@ -718,7 +718,7 @@ FeedHandlerInfo.prototype = {
// the only thing we need to store is the removal of possible handlers
// XXX Should we hold off on making the changes until this method gets called?
store: function() {
for each (let app in this._possibleApplicationHandlers._removed) {
for (let app of this._possibleApplicationHandlers._removed) {
if (app instanceof nsILocalHandlerApp) {
let pref = document.getElementById(PREF_FEED_SELECTED_APP);
var preferredAppFile = pref.value;
@ -1104,7 +1104,7 @@ var gApplicationsPane = {
if (this._filter.value)
visibleTypes = visibleTypes.filter(this._matchesFilter, this);
for each (let visibleType in visibleTypes) {
for (let visibleType of visibleTypes) {
let item = document.createElement("listitem");
item.setAttribute("allowevents", "true");
item.setAttribute("type", visibleType.type);

Просмотреть файл

@ -292,7 +292,7 @@ EngineStore.prototype = {
},
_getEngineByName: function ES_getEngineByName(aName) {
for each (var engine in this._engines)
for (var engine of this._engines)
if (engine.name == aName)
return engine;

Просмотреть файл

@ -2127,7 +2127,7 @@ SessionStoreService.prototype = {
// collect the data for all windows yet to be restored
for (ix in this._statesToRestore) {
for each (let winData in this._statesToRestore[ix].windows) {
for (let winData of this._statesToRestore[ix].windows) {
total.push(winData);
if (!winData.isPopup)
nonPopupCount++;

Просмотреть файл

@ -44,7 +44,7 @@
<body><![CDATA[
// If the view of the notification hasn't been removed yet, remove it.
var notifications = this.allNotifications;
for each (var notification in notifications) {
for (let notification of notifications) {
if (notification.notification == subject) {
notification.close();
break;

Просмотреть файл

@ -64,7 +64,7 @@ var gSyncQuota = {
onAccept: function onAccept() {
let engines = gUsageTreeView.getEnginesToDisable();
for each (let engine in engines) {
for (let engine of engines) {
Weave.Service.engineManager.get(engine).enabled = false;
}
if (engines.length) {
@ -95,7 +95,7 @@ var gUsageTreeView = {
init: function init() {
let retrievingLabel = gSyncQuota.bundle.getString("quota.retrieving.label");
for each (let engine in Weave.Service.engineManager.getEnabled()) {
for (let engine of Weave.Service.engineManager.getEnabled()) {
if (this._ignored[engine.name])
continue;
@ -130,7 +130,7 @@ var gUsageTreeView = {
* Process the quota information as returned by info/collection_usage.
*/
displayUsageData: function displayUsageData(data) {
for each (let coll in this._collections) {
for (let coll of this._collections) {
coll.size = 0;
// If we couldn't retrieve any data, just blank out the label.
if (!data) {
@ -138,7 +138,7 @@ var gUsageTreeView = {
continue;
}
for each (let engineName in coll.engines)
for (let engineName of coll.engines)
coll.size += data[engineName] || 0;
let sizeLabel = "";
sizeLabel = gSyncQuota.bundle.getFormattedString(
@ -173,7 +173,7 @@ var gUsageTreeView = {
// Display which ones will be removed
let freeup = 0;
let toremove = [];
for each (collection in this._collections) {
for (let collection of this._collections) {
if (collection.enabled)
continue;
toremove.push(collection.name);

Просмотреть файл

@ -860,11 +860,7 @@ var gSyncSetup = {
let addonsEngine = Weave.Service.engineManager.get("addons");
if (addonsEngine.enabled) {
let ids = addonsEngine._store.getAllIDs();
let blessedcount = 0;
for each (let i in ids) {
if (i)
blessedcount++;
}
let blessedcount = Object.keys(ids).filter(id => ids[id]).length;
// Bug 600141 does not apply as this does not have to support existing strings.
document.getElementById("addonCount").value =
PluralForm.get(blessedcount,
@ -892,7 +888,7 @@ var gSyncSetup = {
box.appendChild(node);
}
for each (let name in Weave.Service.clientsEngine.stats.names) {
for (let name of Weave.Service.clientsEngine.stats.names) {
// Don't list the current client
if (name == Weave.Service.clientsEngine.localName)
continue;

Просмотреть файл

@ -55,7 +55,7 @@ var gMailViewListController =
onCommandUpdate: function()
{
for each (let command in ["cmd_new", "cmd_edit", "cmd_delete"])
for (let command of ["cmd_new", "cmd_edit", "cmd_delete"])
goUpdateCommand(command);
}
};

Просмотреть файл

@ -140,7 +140,7 @@ function messagePaneOnResize(event)
var messagepane = getMessageBrowser();
var doc = messagepane.contentDocument;
var imgs = doc.images;
for each (var img in imgs)
for (var img of imgs)
{
if (img.className == "moz-attached-image")
{

Просмотреть файл

@ -2898,7 +2898,7 @@ function OnMsgParsed(aUrl)
// scale any overflowing images
var doc = getMessageBrowser().contentDocument;
var imgs = doc.getElementsByTagName("img");
for each (var img in imgs)
for (var img of imgs)
{
if (img.className == "moz-attached-image" &&
img.naturalWidth > doc.body.clientWidth)

Просмотреть файл

@ -677,7 +677,7 @@ function SetTagHeader()
.getService(Components.interfaces.nsIMsgTagService);
var tagArray = tagService.getAllTags({});
var tagKeys = {};
for each (var tagInfo in tagArray)
for (var tagInfo of tagArray)
if (tagInfo.tag)
tagKeys[tagInfo.key] = true;

Просмотреть файл

@ -122,7 +122,7 @@ function GetRootFoldersInFolderPaneOrder()
var accounts = allAccountsSorted(false);
var serversMsgFolders = [];
for each (var account in accounts)
for (var account of accounts)
serversMsgFolders.push(account.incomingServer.rootMsgFolder);
return serversMsgFolders;