Closed Bug 1710356 Opened 3 years ago Closed 3 years ago

Don't hard-code product name as Firefox in "Browser.getVersion"

Categories

(Remote Protocol :: Agent, defect, P3)

defect

Tracking

(firefox92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: whimboo, Assigned: nafees87n, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

User Story

If it's the first time you contribute to the Mozilla code base please have a look at the following docs in how to get started: https://firefox-source-docs.mozilla.org/remote/index.html

Attachments

(1 file)

In the following line Firefox is hard-coded as product name:

https://searchfox.org/mozilla-central/rev/716d7cd80b3dcd81c005ad13b51d3e6a85bd7e73/remote/cdp/domains/parent/Browser.jsm#29

Instead Services.appinfo.name has to be used.

Severity: -- → S3
Priority: -- → P3

Can i work on it?

Yes, you can, and thanks for your interest.

Please see the user story section above in how to get started. If there are problems please let us know. Otherwise the bug will be automatically assigned to you once a patch has been uploaded.

Subramanian, did you face any problems in getting started? If that's the case please let me know how I can help. Thanks.

Sorry for the delay. The link seems to be an indexed search URI. Can I get the link to the actual file in the repo? Also though this is just as a replace change and you already mentioned the value, I would like to know where it is getting used.

So searchfox.org actually shows the path to the file, which in this case is remote/cdp/domains/parent/Browser.jsm. When you have cloned the unified repository as mentioned in the docs, you will find the file at this location.

Right now there are two places where it is getting used that are just integration tests:
https://searchfox.org/mozilla-central/search?q=Browser.getVersion&path=browser_

While these would still pass for Firefox we should also update these to use Services.appinfo.name as reference value for the product name.

I hope that answers all your questions. If not please let me know.

Pardon my ignorance Henik. As I see searchfox is a source indexing tool to make quick searches. Can I get the actual repo link (Like github/gitlab) to clone .git file or create a new branch and make this change quickly from web-ui itself and raise a Merge request? There is no actual url to mozilla central in the attached help doc.

Is anyone working on this? Can I take this up ?

Hello Manisai. It's good to hear your interest. Given that we haven't heard again from Subramanian feel free to get started. Thanks.

Sure, I will take it up and soon send the fix.

Hi Manisai, I wanted to check back if you already had the time to start working on this bug. If there are remaining issues please let me know.

Removed hardcoded product name as firefox in "Browser.getVersion in remote/cdp/domains/parent/Browser.jsm

Assignee: nobody → nafees87n
Status: NEW → ASSIGNED

Hi Henrik,
I submitted a patch. It is my first contribution. Do let me know if its alright

Flags: needinfo?(hskupin)

Thank you Nafees87n, and great to see that you got your first patch up! I had a look at it and added some comments on the Phabricator review. As best lets continue the discussion over there. With the update of your patch done we should be close to get it landed. Thanks again!

Flags: needinfo?(hskupin)
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a95452a9f995 Removed hardcoded product name. r=whimboo,webdriver-reviewers
Regressions: 1723043
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
No longer regressions: 1723043
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: