Closed
Bug 1206174
Opened 9 years ago
Closed 9 years ago
Improve code readability of FMRadioService
Categories
(Firefox OS Graveyard :: Gaia::FMRadio, defect)
Tracking
(firefox44 fixed)
RESOLVED
FIXED
FxOS-S8 (02Oct)
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
Details
Attachments
(2 files, 1 obsolete file)
17.33 KB,
patch
|
alwu
:
review+
|
Details | Diff | Splinter Review |
16.24 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
Recently, I checked FMRadioService code. It seems better to improve code readability. For example, it is not easy to understand which function is hal function.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → sotaro.ikeda.g
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8663095 -
Attachment description: patch - Remove implicit mozilla::hal namespace usage → patch Part 1 - Remove implicit mozilla::hal namespace usage
Assignee | ||
Updated•9 years ago
|
Attachment #8663096 -
Attachment description: patch - Use lambda → patch part 2 - Use lambda
Assignee | ||
Updated•9 years ago
|
Attachment #8663095 -
Flags: review?(alwu)
Assignee | ||
Updated•9 years ago
|
Attachment #8663096 -
Flags: review?(alwu)
Updated•9 years ago
|
Attachment #8663095 -
Flags: review?(alwu) → review+
Comment 3•9 years ago
|
||
Comment on attachment 8663096 [details] [diff] [review] patch part 2 - Use lambda Review of attachment 8663096 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/fmradio/FMRadioService.cpp @@ +752,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(RDSEnabledChanged); > + } > + )); This codes is called lots of times. Maybe we can use the wrapper function, like DispatchRMRadioEventToMainThread(event). @@ +776,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(RDSEnabledChanged); > + } > + )); Ditto. @@ +991,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(PIChanged); > + } > + )); Ditto. @@ +1006,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(PTYChanged); > + } > + )); Ditto. @@ +1043,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(PSChanged); > + } > + )); Ditto. @@ +1063,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(RadiotextChanged); > + } > + )); Ditto. @@ +1109,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(RadiotextChanged); > + } > + )); Ditto. @@ +1128,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(RadiotextChanged); > + } > + )); Ditto. @@ +1169,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(RadiotextChanged); > + } > + )); Ditto. @@ +1185,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(PTYChanged); > + } > + )); Ditto. @@ +1213,5 @@ > + NS_DispatchToMainThread(NS_NewRunnableFunction( > + [self] () -> void { > + self->NotifyFMRadioEvent(NewRDSGroup); > + } > + )); Ditto.
Attachment #8663096 -
Flags: review?(alwu) → review+
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Alastor Wu [:alwu] from comment #3) > Comment on attachment 8663096 [details] [diff] [review] > patch part 2 - Use lambda > > Review of attachment 8663096 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/fmradio/FMRadioService.cpp > @@ +752,5 @@ > > + NS_DispatchToMainThread(NS_NewRunnableFunction( > > + [self] () -> void { > > + self->NotifyFMRadioEvent(RDSEnabledChanged); > > + } > > + )); > > This codes is called lots of times. > Maybe we can use the wrapper function, like > DispatchRMRadioEventToMainThread(event). > Yea, I'll update it.
Assignee | ||
Comment 5•9 years ago
|
||
Attachment #8663096 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8663703 -
Flags: review+
Assignee | ||
Comment 6•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=35f5263bbb81
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bd1f2144cd84
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S8 (02Oct)
You need to log in
before you can comment on or make changes to this bug.
Description
•