Closed
Bug 1434405
Opened 7 years ago
Closed 5 years ago
Clean up unnecessary if statements in Safe Browsing preferences
Categories
(Toolkit :: Safe Browsing, enhancement, P5)
Toolkit
Safe Browsing
Tracking
()
RESOLVED
FIXED
mozilla73
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: francois, Assigned: trimeister.tran)
References
Details
(Keywords: good-first-bug)
Attachments
(4 files, 1 obsolete file)
As per https://bugzilla.mozilla.org/show_bug.cgi?id=1410522#c3, the extra if statements added in bug 1394053 could be removed now that bug 1410522 has re-enabled download protection for all builds.
Comment 2•7 years ago
|
||
Hello Francois, I tried to find you on IRC but couldn't find your nickname there. I was just trying to ask you how to get started on this. It'd be great if you can point me to the right IRC channel. Thanks a lot.
François, will you be mentoring this bug? If you are, please check with Mai on what they need to get started. Thank you.
Flags: needinfo?(francois)
Reporter | ||
Comment 4•7 years ago
|
||
Hi Mai, If you'd like to work on this, please assign this bug to yourself and then look at this patch: https://hg.mozilla.org/mozilla-central/rev/05907bcce126 You will find that it added a number of if statements like this one: if (blockDownloads) { ... } else { ... } Now we can assume that "blockDownloads" is always valid, so we can remove the if and the else clause.
Flags: needinfo?(francois)
Mentor: francois
Comment 6•7 years ago
|
||
Hi Vaishnavi, It's been only 6 days but sure I can leave the bug to you. This bug is a great way to get introduced to the codebase. Please see francois' comment to get started. Thanks.
Hey Mai, Is this still available to be fixed? I'd like to work on it. Thanks, Tri
Comment hidden (mozreview-request) |
Attachment #8957472 -
Attachment is obsolete: true
Comment hidden (mozreview-request) |
Reporter | ||
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8957641 [details] Bug 1434405 - Removed the if and else clauses for blockDownloads https://reviewboard.mozilla.org/r/226536/#review233318 Looks good. Only two small things to fix and this is ready to go. ::: browser/components/preferences/in-content/privacy.js:1252 (Diff revision 1) > blockUncommonUnwanted.setAttribute("disabled", "true"); > } > }); > > - if (blockDownloads) { > blockDownloads.addEventListener("command", function() { nit: this block needs to be reindented as well ::: browser/components/preferences/in-content/privacy.js:1307 (Diff revision 1) > - if (blockDownloads) { > - blockDownloads.checked = blockDownloadsPref.value; > + blockDownloads.checked = blockDownloadsPref.value; > - if (!blockDownloadsPref.value) { > + if (!blockDownloadsPref.value) { > - blockUncommonUnwanted.setAttribute("disabled", "true"); > + blockUncommonUnwanted.setAttribute("disabled", "true"); > - } > + } > - } > + nit: that line can be removed and the trailing whitespace will disappear.
Attachment #8957641 -
Flags: review-
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → trimeister.tran
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Reporter | ||
Comment 13•7 years ago
|
||
Did you amend your original commit or add another commit on top of the original one? The way to make it work with MozReview is to amend the original commit and push to MozReview again. That way it will show up as a second revision and can be merged as a single commit.
Assignee | ||
Comment 14•7 years ago
|
||
I added another commit on top of the original one. That is my mistake, sorry about that. I will do that in the future. I'm still kind of new to mercurial, but can you let me know if I understand this correctly. Should I strip the last commit and revert the changes? i.e., hg strip --keep --rev -1. And then commit again with the amend flag to add to the latest commit. i.e., hg commit --ammend "msg" and then "hg push review". Is that correct? Also, from what I'm seeing is the latest commit still has the changes of the original commit.
Reporter | ||
Comment 15•7 years ago
|
||
An easier way to merge all of the commits together would be to use "hg histedit" and then "fold" the later commits into the first one. Note that you'll need to have the "histedit" extension enabled in your ~/.hgrc file: [extensions] histedit = Once you've done that, you can push to MozReview and that should create a new revision of your patch automatically.
Comment 16•5 years ago
|
||
Bug 1434405 : Removed unnecessary if-else clauses related to |blockDownloads|
Reporter | ||
Comment 17•5 years ago
|
||
I'm no longer a module owner for Safe Browsing so you'll want to ask :dimi for a review instead.
Mentor: francois
Comment 18•5 years ago
|
||
Pushed by rgurzau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b25d115216a2 Clean up unnecessary if statements r=dimi
Comment 19•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox73:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in
before you can comment on or make changes to this bug.
Description
•