Closed
Bug 1240576
Opened 7 years ago
Closed 7 years ago
Use Preferences.jsm module over Services.pref
Categories
(Testing :: Marionette Client and Harness, defect)
Testing
Marionette Client and Harness
Tracking
(firefox46 fixed)
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
Details
(Keywords: pi-marionette-client, pi-marionette-runner, pi-marionette-server)
Attachments
(1 file)
We rely on Services.pref.get{Char,Bool,Number} in Marionette, but the Preferences.jsm module offers a better interface that gets the preference value and automatically coerces it to the right type. Moreover this lets us write code that does not have to rely on try…catch clauses to direct code flow.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → ato
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•7 years ago
|
||
A distinct advantage is that try...catch statements are no longer used to control the flow of code. Review commit: https://reviewboard.mozilla.org/r/31319/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/31319/
Attachment #8709183 -
Flags: review?(dburns)
Assignee | ||
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Comment on attachment 8709183 [details] MozReview Request: Bug 1240576 - Use Preferences.jsm throughout Marionette; r?automatedtester https://reviewboard.mozilla.org/r/31319/#review28201
Attachment #8709183 -
Flags: review?(dburns) → review+
Comment 4•7 years ago
|
||
backoutbugherderlanding |
I had to back this out for b2g xpcshell failures like https://treeherder.mozilla.org/logviewer.html#?job_id=20081356&repo=mozilla-inbound https://hg.mozilla.org/integration/mozilla-inbound/rev/2f8be7ffe2df
Assignee | ||
Comment 5•7 years ago
|
||
Comment on attachment 8709183 [details] MozReview Request: Bug 1240576 - Use Preferences.jsm throughout Marionette; r?automatedtester Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31319/diff/1-2/
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/939930dcd555
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Comment 8•7 years ago
|
||
Andreas, at least the set_pref() method missed the docstring. Would you mind to check what else is necessary here to get the docs up to date? Thanks.
Flags: needinfo?(ato)
Assignee | ||
Comment 9•7 years ago
|
||
The set_pref() method was still missing a docstring before this change. I think it would be reasonable to display _all exposed_ methods and functions in the API documentation, regardless whether they have a docstring or not.
Flags: needinfo?(ato)
Comment 10•7 years ago
|
||
(In reply to Andreas Tolfsen (:ato) from comment #9) > The set_pref() method was still missing a docstring before this change. I > think it would be reasonable to display _all exposed_ methods and functions > in the API documentation, regardless whether they have a docstring or not. David, what's your standpoint here? If you agree we should get another bug filed to get the behavior changed.
Flags: needinfo?(dburns)
Comment 11•7 years ago
|
||
It is better to show all APIs that we can even if docstrings are missing. We can raise a bug to review all missing docstrings.
Flags: needinfo?(dburns)
Comment 12•7 years ago
|
||
Ok filed as bug 1243358.
Updated•2 months ago
|
Product: Testing → Remote Protocol
Comment 13•2 months ago
|
||
Moving bugs for Marionette client due to component changes.
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in
before you can comment on or make changes to this bug.
Description
•