Closed Bug 1261678 Opened 6 years ago Closed 6 years ago

wrong variable name in nsActivityManager.js::getProcessesByContext()


(Thunderbird :: General, defect)

Not set


(thunderbird46 wontfix, thunderbird47 fixed, thunderbird48 fixed, thunderbird_esr4546+ fixed)

Thunderbird 48.0
Tracking Status
thunderbird46 --- wontfix
thunderbird47 --- fixed
thunderbird48 --- fixed
thunderbird_esr45 46+ fixed


(Reporter: aceman, Assigned: aceman)



(Keywords: regression)


(1 file)

There is a typo in the function nsActivityManager.js::getProcessesByContext(), the variable is called 'activity', not 'value' in this instance.

   getProcessesByContext: function(aContextType, aContextObj, aCount) {
     let list = [];
-    for each (let [, activity] in Iterator(this._activities)) {
+    for (let id in this._activities) {
+      let value = this._activities;
       if (activity instanceof Ci.nsIActivityProcess &&
           activity.contextType == aContextType &&
           activity.contextObj == aContextObj) {

Caused in bug 824104
Attached patch 1261678.patchSplinter Review
Attachment #8737602 - Flags: review?(mozilla)
The incorrect line quoted in comment 0 has since been fixed to 'let value = this._activities[id]', but the variable name of 'value' remained.
Comment on attachment 8737602 [details] [diff] [review]

Review of attachment 8737602 [details] [diff] [review]:

Grrr, we already fixed this in bug 1231887 attachment 8697587 [details] [diff] [review] and it was still not right.

What are the effects of this? This needs uplift right into ESR 45, right?
Attachment #8737602 - Flags: review?(mozilla)
Attachment #8737602 - Flags: review+
Attachment #8737602 - Flags: approval-comm-esr45?
Attachment #8737602 - Flags: approval-comm-beta?
Attachment #8737602 - Flags: approval-comm-aurora+
I don't know if it has any effect but the function basically does nothing now, expect for maybe spamming the console with 'undeclared variable activity'.

Yes, I'd suggest this for TB45. That is the time when the bug will arrive to stable users. So lack of bug reports till now (from only nightly users) does not mean the bug is harmless.
Keywords: checkin-needed
Bug 1261678 - fix wrong copy-pasted variable name in nsActivityManager.js::getProcessesByContext() (value => activity). r=jorgk
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 48.0
AFAICT although we should land this in a point release, it is not serious enough to block 45.0
Attachment #8737602 - Flags: approval-comm-esr45? → approval-comm-esr45+
Attachment #8737602 - Flags: approval-comm-beta? → approval-comm-beta-
You need to log in before you can comment on or make changes to this bug.