Closed
Bug 822548
Opened 13 years ago
Closed 13 years ago
fix a bunch of JS warnings on startup
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 20
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(1 file)
4.69 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
There are a "did you mean = instead of ==" and "argument/variable name redeclaration" warnings at startup.
Attachment #693237 -
Flags: review?(gavin.sharp)
Comment 1•13 years ago
|
||
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 | ||
Comment 2•13 years ago
|
||
Assignee: nobody → cam
Status: NEW → ASSIGNED
Version: unspecified → Trunk
Comment 3•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
You need to log in
before you can comment on or make changes to this bug.
Description
•