Closed
Bug 1147211
Opened 10 years ago
Closed 9 years ago
Replace usages of var with let in LoginManagerPrompter.
Categories
(Firefox for Android Graveyard :: General, defect, P4)
Tracking
(firefox48 fixed)
RESOLVED
FIXED
Firefox 48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: liuche, Assigned: dolcinis, Mentored)
References
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(1 file, 2 obsolete files)
2.73 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
This should wait until anything we ending up needing to uplift for 39 has been done.
Updated•10 years ago
|
Mentor: liuche
Whiteboard: [good first bug][lang=js]
Chenxia, is this good to go?
Flags: needinfo?(liuche)
Reporter | ||
Comment 2•9 years ago
|
||
Oh, yeah - no more changes being made to LoginManagerPrompter.
Flags: needinfo?(liuche)
Assignee | ||
Comment 3•9 years ago
|
||
Assignee: nobody → dolcinis
Comment on attachment 8672999 [details] [diff] [review]
This patch replaces some vars inside if blocks.
Thanks for the patch Stanislas! One thing I'd recommend is flagging a reviewer when uploading a patch (click the "Details" link next to the patch to find the option). I've flagged the mentor of this bug for reviewer and they should get back to you soon.
Attachment #8672999 -
Flags: review?(liuche)
Comment 6•9 years ago
|
||
Comment on attachment 8672999 [details] [diff] [review]
This patch replaces some vars inside if blocks.
Review of attachment 8672999 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me! I do notice that there are other `var` variables declared in the file, so we should look into fixing those while we're here.
Bug 1147197 would also be another good bug for you to work on!
Attachment #8672999 -
Flags: review?(liuche) → review+
Assignee | ||
Comment 7•9 years ago
|
||
I do not always remember when to remove var by let
for me it's
for(let) stuff
all the variables in if
Is there something else ?
If you point me the vars I need to replace i'll make another patch tonight :)
Regards
Comment 8•9 years ago
|
||
(In reply to Stanislas Daniel Claude Dolcini from comment #7)
> I do not always remember when to remove var by let
>
> for me it's
>
> for(let) stuff
> all the variables in if
>
> Is there something else ?
>
> If you point me the vars I need to replace i'll make another patch tonight :)
>
> Regards
Sorry for the slow response! In the future, you can use the needinfo? flag to make sure questions don't slip through the cracks :)
Here is some documentation about how `let` works:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let
Generally, people like to use `let` because it helps you avoid mistakes that can be caused by the way `var` "hoists" variable declarations.
Thinking more about this bug, I'm not sure it's worth digging into this in too much detail, unless we see places where we might be making mistakes with `var`.
You can update this patch to apply on top of the patch for bug 1147197, and see if there are any other places it would be worth making this change. Then I can re-review and land this.
Assignee | ||
Comment 9•9 years ago
|
||
This patches replace the use of var in nested conditions. There is not really a point of replacing vars at function level according to the documentation.
Attachment #8672999 -
Attachment is obsolete: true
Attachment #8681321 -
Flags: review?(margaret.leibovic)
Comment 10•9 years ago
|
||
Comment on attachment 8681321 [details] [diff] [review]
bug_1147211.patch
Review of attachment 8681321 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me. Thanks for investigating.
::: mobile/android/components/LoginManagerPrompter.js
@@ +428,2 @@
> if (port != handler.defaultPort)
> hostname += ":" + port;
It looks like the indentation in here got a bit messed up... could you fix this while you're here?
Attachment #8681321 -
Flags: review?(margaret.leibovic) → review+
Assignee | ||
Comment 11•9 years ago
|
||
Done :)
Attachment #8681321 -
Attachment is obsolete: true
Attachment #8682516 -
Flags: review?(margaret.leibovic)
Updated•9 years ago
|
Attachment #8682516 -
Flags: review?(margaret.leibovic) → review+
Margaret, can this land?
Flags: needinfo?(margaret.leibovic)
Comment 13•9 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #12)
> Margaret, can this land?
Yes! Sorry I let this slip through the cracks :(
Flags: needinfo?(margaret.leibovic)
Keywords: checkin-needed
Comment 16•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/b6e38de09b1a8f6e5a04c899006943c810761354
Bug 1147211 - Replace usages of var with let in LoginManagerPrompter.js in nested code. r=margaret
Updated•9 years ago
|
Flags: needinfo?(margaret.leibovic)
Comment 17•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•