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

RESOLVED FIXED in Thunderbird 48.0

Status

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

({regression})

Trunk
Thunderbird 48.0
Dependency tree / graph

Thunderbird Tracking Flags

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

Details

Attachments

(1 attachment)

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) {
         list.push(activity);
       }
     }

Caused in bug 824104
Posted 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]
1261678.patch

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
https://hg.mozilla.org/comm-central/rev/ba30dd5df13d6c0ec3adb79f07b7a3bc4d9064a5
Bug 1261678 - fix wrong copy-pasted variable name in nsActivityManager.js::getProcessesByContext() (value => activity). r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 3 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.