Closed Bug 1702491 Opened 3 years ago Closed 2 years ago

Remove unnecessary try/catch and null checks for QI in http-on-modify-request

Categories

(Firefox :: General, task)

task

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: mkaply, Assigned: sabina.zaripova)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

In many places in the code, where http-on-modify-request is handled, we put a try/catch around the QI and in some cases do a null check on the return.

For example:

https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/RFPHelper.jsm#204

http-on-modify-request is only ever called with an httpchannel, so the try catch is unnecessary.

In addition, the QI can't return null because it is always an http channel.

There are actually two places this applies. Finding the other one is left to the fixer :).

Keywords: good-first-bug
Assignee: nobody → sabina.zaripova
Status: NEW → ASSIGNED
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/11590cf81861
remove redundant checks for QI. r=mkaply,webdriver-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: