Last Comment Bug 745524 - Minor code cleanup in PopupNotifications.jsm
: Minor code cleanup in PopupNotifications.jsm
Status: RESOLVED FIXED
[doorhanger]
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: Firefox 14
Assigned To: Tetsuharu OHZEKI [:tetsuharu] [UTC+9]
:
:
Mentors:
Depends on:
Blocks: 745525
  Show dependency treegraph
 
Reported: 2012-04-15 02:24 PDT by Tetsuharu OHZEKI [:tetsuharu] [UTC+9]
Modified: 2012-04-16 08:30 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
proposed patch (18.22 KB, patch)
2012-04-15 02:28 PDT, Tetsuharu OHZEKI [:tetsuharu] [UTC+9]
dolske: review-
Details | Diff | Splinter Review
patch (part1) (7.27 KB, patch)
2012-04-15 15:19 PDT, Tetsuharu OHZEKI [:tetsuharu] [UTC+9]
dolske: review+
Details | Diff | Splinter Review
patch (part2) (14.53 KB, text/plain)
2012-04-15 15:20 PDT, Tetsuharu OHZEKI [:tetsuharu] [UTC+9]
no flags Details
patch (part2) (14.53 KB, patch)
2012-04-15 15:21 PDT, Tetsuharu OHZEKI [:tetsuharu] [UTC+9]
dolske: review-
Details | Diff | Splinter Review
patch for check-in (7.28 KB, patch)
2012-04-15 15:53 PDT, Tetsuharu OHZEKI [:tetsuharu] [UTC+9]
dolske: review+
Details | Diff | Splinter Review

Description Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-04-15 02:24:54 PDT
Form PopupNotifications.jsm.
*Define some properties which are substituted but not clearly specify.
*Add curly bracket to statement.
*Fill "," or ";".
Comment 1 Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-04-15 02:28:15 PDT
Created attachment 615122 [details] [diff] [review]
proposed patch
Comment 2 Justin Dolske [:Dolske] 2012-04-15 13:33:41 PDT
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.
Comment 3 Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-04-15 15:19:32 PDT
Created attachment 615194 [details] [diff] [review]
patch (part1)

The patch without bracing.
Comment 4 Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-04-15 15:20:31 PDT
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.
Comment 5 Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-04-15 15:21:51 PDT
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.
Comment 6 Justin Dolske [:Dolske] 2012-04-15 15:25:35 PDT
Comment on attachment 615194 [details] [diff] [review]
patch (part1)

r+, again I didn't test so assuming it works. ;)
Comment 7 Justin Dolske [:Dolske] 2012-04-15 15:30:51 PDT
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.)
Comment 8 Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-04-15 15:47:53 PDT
(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.
Comment 9 Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-04-15 15:53:16 PDT
Created attachment 615203 [details] [diff] [review]
patch for check-in

This patch for check-in.
Comment 10 Josh Matthews [:jdm] (on vacation until Dec 5) 2012-04-15 16:12:08 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/b69c5c0bb727

Note You need to log in before you can comment on or make changes to this bug.