Closed
Bug 1209470
Opened 9 years ago
Closed 9 years ago
Remove use of expression closure from Add-on SDK.
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
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
* function expression, contains `arguments`
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
I have draft patches, will post them after test.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → arai.unmht
Attachment #8667297 -
Flags: review?(rFobic)
Assignee | ||
Updated•9 years ago
|
Attachment #8667297 -
Flags: review?(rFobic) → review?(dtownsend)
Assignee | ||
Comment 2•9 years ago
|
||
oh, there's already conflict, let me fix it shortly.
Assignee | ||
Comment 3•9 years ago
|
||
that was a conflict with "let to var" patch.
updated :)
Comment 4•9 years ago
|
||
Comment on attachment 8667297 [details] [review]
Remove use of expression closure from Add-on SDK.
(In reply to Tooru Fujisawa [:arai] from comment #0)
> converting rules are following:
> * function declaration
> add `return` and braces
> * standalone named function expression
> add `return` and braces
> * function expression, contains `arguments`
> 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
This looks like the right set of rules and skimming over the patch looks like everything is ok. I'm assuming everything passes on try with this applied in which case please land this in the addon-sdk tree in mercurial.
Attachment #8667297 -
Flags: review?(dtownsend) → review+
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b3cd4c97272fdb09d8fc1ed7f16ed3f3f6bfb11
Bug 1209470 - Remove use of expression closure from Add-on SDK. r=mossop
Comment 6•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•