Closed Bug 1602401 Opened 4 months ago Closed 4 months ago

Remove a nested redundant #if/#endif pair

Categories

(Firefox Build System :: Lint and Formatting, task, minor)

73 Branch
task
Not set
minor

Tracking

(firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: tanner.e.davies, Assigned: atul.ramkrishnan97, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: lang=C++)

Attachments

(1 file)

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

Actual results:

A check for MOZ_SANDBOX is nestled within another #if (MOZ_SANDBOX) block. The block whose #if/#endif pair needs to be removed:
https://searchfox.org/mozilla-central/source/toolkit/xre/nsXREDirProvider.cpp#742-746

The #if/#endif are unnecessary because the code is already wrapped in this block: https://searchfox.org/mozilla-central/source/toolkit/xre/nsXREDirProvider.cpp#607-835

It appears this pair was mistakenly added as part of bug 1375863.

Severity: normal → minor
Type: defect → task
Keywords: good-first-bug
OS: Unspecified → All
Hardware: Unspecified → All
Whiteboard: lang=C++

This is a good first bug to learn workflows. The #if/endif pair from lines 740 and 744 (I may have put the wrong lines in the description) need to be removed (but not the code contained within the block).

Component: Untriaged → Lint and Formatting
Product: Firefox → Firefox Build System
Mentor: sledru
Status: UNCONFIRMED → NEW
Ever confirmed: true

Hello. I'm new to Open Source and I'd love to work on this bug under your mentorship.

Hello , I would Like to take this bug under your mentorship

(In reply to Sylvestre Ledru [:Sylvestre] from comment #2)

Thanks!
The doc on how to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html

Hello,
This Doc has all the guidelines for windows but not for linux .
I'm new to open source So I hope you understand and provide me a similar doc for linux OS

this doc is for all platform

The first section of the doc says “Getting started (for Windows),” but really the doc is for all platforms. What you need to worry about in that doc is how to clone the repo, then how to create, test and submit a patch and edit a patch that has been submitted.

Follow these instructions first and then, after you’ve fixed the bug, follow the instructions in that doc for submitting a patch:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build/Linux_and_MacOS_build_preparation

I tried to remove this ambiguity here:
https://phabricator.services.mozilla.com/D56679

Assignee: nobody → atul.ramkrishnan97

(In reply to Tanner Davies from comment #7)

The first section of the doc says “Getting started (for Windows),” but really the doc is for all platforms. What you need to worry about in that doc is how to clone the repo, then how to create, test and submit a patch and edit a patch that has been submitted.

Follow these instructions first and then, after you’ve fixed the bug, follow the instructions in that doc for submitting a patch:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build/Linux_and_MacOS_build_preparation

Thank you sir for the help but I'm still confused .
Could you please tell me from where should I start to solve this issue ?

Sylvestre, I'm no mentor so I hope you don't mind me giving some guidance.

Mahak, if you haven't cloned the repo yet, follow this instructions in this link: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions

If you have, go ahead and make your changes. After you've made them, follow these instructions to submit them.: https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html You may have to scroll down a ways to find how to submit a patch.

Thankyou Sir for the help but
these are three methods to get the source code given in the link
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions
1.Download Mozilla Source Code
Source code for releases is available for download via FTP/HTTP.
2.Mozilla Source Code via Mercurial
Those doing active development on Firefox can check out the latest source using Mercurial. This is the preferred method if you plan to provide patches and fix bugs, as it lets you get up-to-the-minute changes and merge them with your own.
3.Comm-central Source Code via Mercurial
Those doing active development on Thunderbird/SeaMonkey/Firefox can check out the latest source using Mercurial. This method includes all the code for the applications mentioned, so you can work on Firefox development, and still build Thunderbird or SeaMonkey as well.

In any of these methods I'm not able to find how to get the files of this issue i.e not able to clone the repo related to this issue.
I request you to please help.

(In reply to Sylvestre Ledru [:Sylvestre] from comment #14)

Please follow:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
it is up to date

I have already done all the instructions given in the above link but still I'm not able to find the files that are to be changed

Mahak, the owner of this bug fixed it.
bug 1603100 is an easy good first bug

Sir,I know this bug is fixed but still I want to know the answer of my question .
It would be very kind if you can help me .
My question is how do I clone the repo i.e how will I get all the files in my system

Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ccafb121bbca
Remove a nested redundant #if/#endif pair r=mossop

Mahak, the file to be fixed is this one:
https://searchfox.org/mozilla-central/source/toolkit/xre/nsXREDirProvider.cpp#740-744
The web link shows you the path to the file.

In your local repo, it is probably in [your repo path]/toolkit/xre/nsXREDirProvider.cpp

(In reply to Tanner Davies from comment #19)

Mahak, the file to be fixed is this one:
https://searchfox.org/mozilla-central/source/toolkit/xre/nsXREDirProvider.cpp#740-744
The web link shows you the path to the file.

In your local repo, it is probably in [your repo path]/toolkit/xre/nsXREDirProvider.cpp

Thanks a lot sir.
I know this was very silly but I'new to open source.
Thanks again for the help

Status: NEW → ASSIGNED

No worries. It wasn’t silly. It is hard to figure out how new projects are organized and managed. I’ve asked my own share of “silly” questions.

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.