Bug 821507: Add parens around assignment-used-as-loop-condition in XPIProvider.jsm and PluginProvider.jsm, to fix JS strict warning "test for equality mistyped as assignment". r=Mossop

This commit is contained in:
Daniel Holbert 2012-12-13 15:23:43 -08:00
parent 073a7f982a
commit 89f18cd5ea
2 changed files with 4 additions and 4 deletions

View File

@ -236,7 +236,7 @@ function PluginWrapper(aId, aName, aDescription, aTags) {
let size = 0;
let entries = aFile.directoryEntries.QueryInterface(Ci.nsIDirectoryEnumerator);
let entry;
while (entry = entries.nextFile) {
while ((entry = entries.nextFile)) {
if (entry.isSymlink() || !entry.isDirectory())
size += entry.fileSize;
else

View File

@ -887,7 +887,7 @@ function loadManifestFromDir(aDir) {
let size = 0;
let entries = aFile.directoryEntries.QueryInterface(Ci.nsIDirectoryEnumerator);
let entry;
while (entry = entries.nextFile)
while ((entry = entries.nextFile))
size += getFileSize(entry);
entries.close();
return size;
@ -1312,7 +1312,7 @@ function recursiveLastModifiedTime(aFile) {
let entries = aFile.directoryEntries.QueryInterface(Ci.nsIDirectoryEnumerator);
let entry, time;
let maxTime = aFile.lastModifiedTime;
while (entry = entries.nextFile) {
while ((entry = entries.nextFile)) {
time = recursiveLastModifiedTime(entry);
maxTime = Math.max(time, maxTime);
}
@ -2171,7 +2171,7 @@ var XPIProvider = {
let entries = distroDir.directoryEntries
.QueryInterface(Ci.nsIDirectoryEnumerator);
let entry;
while (entry = entries.nextFile) {
while ((entry = entries.nextFile)) {
let id = entry.leafName;