Use XPCOMUtils.defineLazyPreferenceGetter instead of Services.prefs.addObserver
Categories
(Remote Protocol :: Marionette, enhancement, P3)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: whimboo, Assigned: rgpt)
Details
Attachments
(1 file)
Reporter | ||
Comment 1•6 years ago
|
||
Rishi, is that something you might want to have a look at? I know it's Javascript and not Python but it would give you actually a chance to work on the Marionette server component, which is in Firefox.
Assignee | ||
Comment 2•6 years ago
|
||
@whimboo, i got the part that for performance we are going to use lazy addition and XPCOM expose such functions but i am little unaware on working of Services and XPCOMutil which is a part of xpconnect (which is a bridge between XPCOM and JS).
Also what should be the default value while using XPCOMUtils.defineLazyPreferenceGetter for this preference and after making change i can verify this by simple running one of marionette-test cases right as marionette server would run in that case or do i have to check preference in some other way.
Reporter | ||
Comment 3•6 years ago
|
||
The required work for this bug is all JS and all part of the above mentioned marionette.js
file. There is nothing in Services, XPCOMUtils, or other files where changes are necessary.
In regards of the default value, you can find it a couple lines above:
https://dxr.mozilla.org/mozilla-central/rev/085cdfb90903d4985f0de1dc7786522d9fb45596/testing/marionette/components/marionette.js#279
The new API smoothly combines both cases into a single routine. So no need to explicitly read the pref during start-up, and observing it as long as Firefox is running.
Let me know if you have questions, and we can discuss those on IRC. Please note that I will not be around next week on Monday and Tuesday.
Assignee | ||
Comment 4•6 years ago
|
||
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 6•6 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•