Remove a nested redundant #if/#endif pair
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(firefox73 fixed)
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.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
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).
Reporter | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Thanks!
The doc on how to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
Comment 3•5 years ago
|
||
Hello. I'm new to Open Source and I'd love to work on 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
Comment 6•5 years ago
|
||
this doc is for all platform
Reporter | ||
Comment 7•5 years ago
|
||
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
Reporter | ||
Comment 8•5 years ago
|
||
Here is the Windows equivalent of the link I gave my last comment:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites
Comment 9•5 years ago
|
||
I tried to remove this ambiguity here:
https://phabricator.services.mozilla.com/D56679
Assignee | ||
Comment 10•5 years ago
|
||
Updated•5 years ago
|
Comment 11•5 years ago
|
||
(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 ?
Reporter | ||
Comment 12•5 years ago
|
||
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.
Comment 13•5 years ago
|
||
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.
Comment 14•5 years ago
|
||
Please follow:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
it is up to date
Comment 15•5 years ago
|
||
(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
Comment 16•5 years ago
|
||
Mahak, the owner of this bug fixed it.
bug 1603100 is an easy good first bug
Comment 17•5 years ago
|
||
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
Comment 18•5 years ago
|
||
Reporter | ||
Comment 19•5 years ago
|
||
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
Comment 20•5 years ago
|
||
(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
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 21•5 years ago
|
||
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.
Comment 22•5 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•