Closed
Bug 1207496
Opened 10 years ago
Closed 10 years ago
Remove use of expression closure from services/.
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 44
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(4 files)
|
3.26 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
|
1.28 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
1.62 KB,
patch
|
markh
:
review+
|
Details | Diff | Splinter Review |
|
21.89 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
Need to replace non-standard expression closure with one of:
* function declaration
* function expression
* arrow function
before fixing bug 1083458.
converting rules are following:
* function declaration
add `return` and braces
* standalone named function expression
add `return` and braces
* standalone anonymous function expression contans and receives `this` (Array.filter, bind, etc)
convert to arrow function, and remove code passing |this|
* standalone anonymous function expression contans no `this`
convert to arrow function
* property with anonymous function expression, contains `this`
add `return` and braces
* property with anonymous function expression, contains no `this`, short body
convert to arrow function
* property with anonymous function expression, contains no `this`, long body
add `return` and braces
* property with named function expression
add `return` and braces
* getter property
add `return` and braces
* setter property
add braces
Since there are a lot of patches, separated into 8 bugs, each bug corresponds to one of following directories:
* browser/, except browser/components/.
* browser/components/.
* dom/.
* layout/.
* services/.
* toolkit/, except toolkit/components/.
* toolkit/components/.
* b2g/, chrome/, docshell/, mobiles/, modules/, netwerk/, parser/, security/, storage/, testing/, webapprt/, widget/, xpcom/
(not yet touched addon-sdk)
I have draft patches, will post them (may take some time to prepare and post).
| Assignee | ||
Comment 1•10 years ago
|
||
Additional rule:
* function expression, contains `arguments`
add `return` and braces
Almost green on try run: (with other patches, M(13) is not related)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c844b363eef3
Assignee: nobody → arai.unmht
Attachment #8666791 -
Flags: review?(gps)
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8666793 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8666794 -
Flags: review?(markh)
| Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8666795 -
Flags: review?(gps)
Comment 5•10 years ago
|
||
Comment on attachment 8666791 [details] [diff] [review]
Part 1: Remove use of expression closure from services/common/.
Review of attachment 8666791 [details] [diff] [review]:
-----------------------------------------------------------------
Expression closures were never part of our coding style in services - surprised to see them :/ This is why we need automatic linting.
LGTM.
Attachment #8666791 -
Flags: review?(gps) → review+
Comment 6•10 years ago
|
||
Comment on attachment 8666795 [details] [diff] [review]
Part 4: Remove use of expression closure from services/sync/.
Review of attachment 8666795 [details] [diff] [review]:
-----------------------------------------------------------------
I mostly glazed over this. But LGTM.
Attachment #8666795 -
Flags: review?(gps) → review+
Comment 7•10 years ago
|
||
Comment on attachment 8666793 [details] [diff] [review]
Part 2: Remove use of expression closure from services/crypt/.
Review of attachment 8666793 [details] [diff] [review]:
-----------------------------------------------------------------
I don't know if I'm technically a peer here, but this is pretty obvious.
Attachment #8666793 -
Flags: review?(mrbkap) → review+
Updated•10 years ago
|
Attachment #8666794 -
Flags: review?(markh) → review+
https://hg.mozilla.org/mozilla-central/rev/1cfe6acea8f3
https://hg.mozilla.org/mozilla-central/rev/33fd45d1b555
https://hg.mozilla.org/mozilla-central/rev/71df142400cf
https://hg.mozilla.org/mozilla-central/rev/04ff035c4507
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
You need to log in
before you can comment on or make changes to this bug.
Description
•