Closed
Bug 1508175
Opened 6 years ago
Closed 6 years ago
ReferenceError: assignment to undeclared variable windowToInheritFrom mailTabs.js:76
Categories
(Thunderbird :: Toolbars and Tabs, enhancement)
Thunderbird
Toolbars and Tabs
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 65.0
People
(Reporter: aceman, Assigned: darktrojan)
References
Details
Attachments
(1 file)
1.47 KB,
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
Today I suddenly get "ReferenceError: assignment to undeclared variable windowToInheritFrom mailTabs.js:76" just by starting TB. Looks like this hunk in the patch from bug 1498041 is the culprit: https://hg.mozilla.org/comm-central/rev/c680423af71f9cc93a50876c0218967b85a8995b - openFirstTab: function(aTab) { + openFirstTab(aTab) { this.openTab(aTab, true, new MessagePaneDisplayWidget(), true); // persistence and restoreTab wants to know if we are the magic first tab aTab.firstTab = true; // Inherit the search mode from a window - let windowToInheritFrom = null; if (window.opener && (window.opener.document.documentElement.getAttribute("windowtype") == "mail:3pane")) windowToInheritFrom = window.opener; else windowToInheritFrom = FindOther3PaneWindow(); Why is the declaration removed? It seems the variable isn't used anywhere, so the whole block setting it could be removed. But this needs verification in the code history.
Comment 1•6 years ago
|
||
Why didn't the linter find this? Assignment to a now undeclared variable?
Assignee | ||
Comment 2•6 years ago
|
||
I've got that rule turned off in this folder for now, because there's still 1600 errors to fix for it, almost all stuff that's included from another file. I've got a fix for this, I'm just checking why the use of the variable went away.
Assignee | ||
Comment 3•6 years ago
|
||
Okay, it was intentionally removed in https://hg.mozilla.org/comm-central/diff/1e333d47863d/mail/base/content/mailTabs.js . If only we'd had linting in 2010…
Assignee | ||
Comment 4•6 years ago
|
||
Attachment #9025963 -
Flags: review?(acelists)
Comment on attachment 9025963 [details] [diff] [review] 1508175-1.diff Review of attachment 9025963 [details] [diff] [review]: ----------------------------------------------------------------- Thanks.
Attachment #9025963 -
Flags: review?(acelists) → review+
Pushed by acelists@atlas.sk: https://hg.mozilla.org/comm-central/rev/2dd62f4bcac3 Stop assigning to undeclared, unused variable windowToInheritFrom. r=aceman
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•