Closed Bug 1920167 Opened 1 year ago Closed 1 year ago

Add missing .length property in looping logic of 'extractDomainsFromDocument' method

Categories

(Firefox :: Search, defect)

Firefox 130
defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: kernp25, Assigned: scunnane)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0

Expected results:

This should be if (!elements.length) {?

Flags: needinfo?(rob)

Thanks for your report. This looks like a valid bug and easy to fix.

The code was introduced in bug 1846357. Because of the bug, all logic below is skipped: https://searchfox.org/mozilla-central/rev/43450868e9f3e26da88a02837e5a43c93728ea95/browser/actors/SearchSERPTelemetryChild.sys.mjs#1158-1188

Stephanie, as the author of the code, can you take a look? Fixing this is trivial, but you may also want to consider the impact of the issue and/or request uplifts if needed.

Status: UNCONFIRMED → NEW
Component: Untriaged → Search
Ever confirmed: true
Flags: needinfo?(rob) → needinfo?(scunnane)
See Also: → 1846357
Assignee: nobody → scunnane
Status: NEW → ASSIGNED

Wow kernp25, thanks for finding this.

I'm not going to request an uplift since the missing property isn't actually causing an issue in the existing code. (The methods that call extractDomainsFromDocument already skip over empty arrays.)

Flags: needinfo?(scunnane)
Summary: if check wrong → Add missing .length property in looping logic of 'extractDomainsFromDocument' method
Pushed by scunnane@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2913dfac59e7 Add missing .length property in looping logic of 'extractDomainsFromDocument' method. r=jteow
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: