Closed Bug 822548 Opened 13 years ago Closed 13 years ago

fix a bunch of JS warnings on startup

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 20

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
There are a "did you mean = instead of ==" and "argument/variable name redeclaration" warnings at startup.
Attachment #693237 - Flags: review?(gavin.sharp)
Comment on attachment 693237 [details] [diff] [review] patch >--- a/browser/components/sessionstore/src/SessionStore.jsm >+++ b/browser/components/sessionstore/src/SessionStore.jsm >@@ -1274,7 +1274,7 @@ let SessionStoreInternal = { > // we need to reset that state. If the tab was restoring, we will attempt to > // restore the next tab. > let previousState; >- if (previousState = browser.__SS_restoreState) { >+ if ((previousState = browser.__SS_restoreState)) { > this._resetTabRestoringState(aTab); > if (previousState == TAB_STATE_RESTORING) > this.restoreNextTab(); write this instead: let previousState = browser.__SS_restoreState; if (previousState) { >--- a/toolkit/mozapps/update/nsUpdateService.js >+++ b/toolkit/mozapps/update/nsUpdateService.js >@@ -3622,9 +3622,9 @@ Downloader.prototype = { > LOG("Downloader:onStopRequest - verification of patch failed, " + > "downloading complete update patch"); > this._update.isCompleteUpdate = true; >- var status = this.downloadUpdate(this._update); >+ var updateStatus = this.downloadUpdate(this._update); > >- if (status == STATE_NONE) { >+ if (updateStatus == STATE_NONE) { > cleanupActiveUpdate(); > } else { > allFailed = false; use 'let' rather than 'var'
Attachment #693237 - Flags: review?(gavin.sharp) → review+
Assignee: nobody → cam
Status: NEW → ASSIGNED
Version: unspecified → Trunk
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Blocks: fx-noise
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: