Minor code cleanup in PopupNotifications.jsm

RESOLVED FIXED in Firefox 14

Status

()

Firefox
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: tetsuharu, Assigned: tetsuharu)

Tracking

Trunk
Firefox 14
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [doorhanger])

Attachments

(1 attachment, 4 obsolete attachments)

Form PopupNotifications.jsm.
*Define some properties which are substituted but not clearly specify.
*Add curly bracket to statement.
*Fill "," or ";".
Created attachment 615122 [details] [diff] [review]
proposed patch
Attachment #615122 - Flags: review?(dolske)
(Assignee)

Updated

5 years ago
Blocks: 745525
(Assignee)

Updated

5 years ago
Whiteboard: [doorhanger]
Comment on attachment 615122 [details] [diff] [review]
proposed patch

I'd rather not do all the brace conversion (|if (x) y| --> |if(x) { y }|.

The other parts should be fine, though I'd like to look again without the extra diffs from the bracing.
Attachment #615122 - Flags: review?(dolske) → review-
Created attachment 615194 [details] [diff] [review]
patch (part1)

The patch without bracing.
Attachment #615122 - Attachment is obsolete: true
Attachment #615194 - Flags: review?(dolske)
Created attachment 615196 [details]
patch (part2)

The patch with bracing only.
I think, add bracing will be decrease bugs and developer's cobweb on debug.
And also, changing parts will separate purely from add bracing in the future.
Attachment #615196 - Flags: review?(dolske)
Created attachment 615197 [details] [diff] [review]
patch (part2)

The patch with bracing only.
I think, add bracing will be decrease bugs and developer's cobweb on debug.
And also, changing parts will separate purely from add bracing in the future.
Attachment #615196 - Attachment is obsolete: true
Attachment #615196 - Flags: review?(dolske)
Attachment #615197 - Flags: review?(dolske)
Summary: Form PopupNotifications.jsm → Minor code cleanup in PopupNotifications.jsm
Assignee: nobody → saneyuki.s.snyk
Comment on attachment 615194 [details] [diff] [review]
patch (part1)

r+, again I didn't test so assuming it works. ;)
Attachment #615194 - Flags: review?(dolske) → review+
Comment on attachment 615197 [details] [diff] [review]
patch (part2)

Review of attachment 615197 [details] [diff] [review]:
-----------------------------------------------------------------

(In reply to OHZEKI Tetsuharu [:saneyuki_s] from comment #5)
> The patch with bracing only.
> I think, add bracing will be decrease bugs and developer's cobweb on debug.
> And also, changing parts will separate purely from add bracing in the future.

Style here varies across the codebase; some places do it one way, others do it the other way. I don't think there's much value in changing existing code (and, similarly, I would accept new code using either style). About the only constant is that when using if+else, when either block is braced the other block should be too.

So r- on this part2.

(For the record: Landing just part 1 and closing this bug is ok.)
Attachment #615197 - Flags: review?(dolske) → review-
(In reply to Justin Dolske [:Dolske] from comment #7)
> Comment on attachment 615197 [details] [diff] [review]
> patch (part2)
> 
> Review of attachment 615197 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> (In reply to OHZEKI Tetsuharu [:saneyuki_s] from comment #5)
> > The patch with bracing only.
> > I think, add bracing will be decrease bugs and developer's cobweb on debug.
> > And also, changing parts will separate purely from add bracing in the future.
> 
> Style here varies across the codebase; some places do it one way, others do
> it the other way. I don't think there's much value in changing existing code
> (and, similarly, I would accept new code using either style). About the only
> constant is that when using if+else, when either block is braced the other
> block should be too.
> 
> So r- on this part2.
> 
> (For the record: Landing just part 1 and closing this bug is ok.)

I get your account. Thank you for the review.
I'll make the patch for check-in.
Created attachment 615203 [details] [diff] [review]
patch for check-in

This patch for check-in.
Attachment #615194 - Attachment is obsolete: true
Attachment #615197 - Attachment is obsolete: true
Attachment #615203 - Flags: review?(dolske)
Attachment #615203 - Flags: review?(dolske) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/b69c5c0bb727
Target Milestone: --- → Firefox 14
https://hg.mozilla.org/mozilla-central/rev/b69c5c0bb727
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.