Never run Marionette code if Marionette is not enabled
Categories
(Remote Protocol :: Marionette, defect, P1)
Tracking
(firefox-esr68 wontfix, firefox75 fixed, firefox76 verified)
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
If Marionette hasn't been enabled we shouldn't run any of its code. Right now this happens because the component registers the profile-after-change
observer notification. And as such we register for various other notifications, and in the worst case quit Firefox if eg. a XML parse error happens. See bug 1616856 for details.
I would suggest that we read the value of the marionette.enabled
pref only during startup, and never update it when a user changes the pref during runtime. That way we can safely skip all the observer registrations, and don't have to worry about inconsistent states.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D67035
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D67036
Assignee | ||
Comment 4•5 years ago
•
|
||
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0656956fe08b
https://hg.mozilla.org/mozilla-central/rev/5d11cda6e6ad
https://hg.mozilla.org/mozilla-central/rev/cd3e1f0bdeeb
Comment 7•5 years ago
|
||
The patch landed in nightly and beta is affected.
:whimboo, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 8•5 years ago
|
||
Thanks for the reminder. We should indeed uplift this test-patch to beta.
Comment 10•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #8)
Thanks for the reminder. We should indeed uplift this test-patch to beta.
Ah, commented before I saw this - I think you normally need to request beta approval if you want uplift?
Assignee | ||
Comment 11•5 years ago
|
||
Yes you are right. Just clarified with RyanVM on Matrix.
Assignee | ||
Comment 12•5 years ago
|
||
I just went through all the options for enabling Marionette, and I can verify with a Nightly build that only with those set Marionette will run.
Assignee | ||
Comment 13•5 years ago
|
||
Comment on attachment 9133671 [details]
Bug 1622012 - [marionette] Only initialize Marionette during startup if explicitely enabled.
Beta/Release Uplift Approval Request
- User impact if declined: Marionette registers some observer notifications during startup even when it hasn't been enabled. As result it will force close Firefox in case of XML parsing errors.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Disabling the registration of observer notifications won't cause Marionette to get partially initialized.
- String changes made/needed: None
Assignee | ||
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Comment on attachment 9133671 [details]
Bug 1622012 - [marionette] Only initialize Marionette during startup if explicitely enabled.
approved for 75.0b10
Updated•5 years ago
|
Updated•5 years ago
|
Comment 15•5 years ago
|
||
bugherder uplift |
Updated•5 years ago
|
Updated•2 years ago
|
Description
•