Closed Bug 1561061 Opened 5 years ago Closed 5 years ago

Move (push|pop|flush)PrefEnv logic into the parent process

Categories

(Testing :: Mochitest, task, P2)

task

Tracking

(Fission Milestone:M4, firefox69 fixed)

RESOLVED FIXED
mozilla69
Fission Milestone M4
Tracking Status
firefox69 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

Details

Attachments

(1 file)

Bug 1541557 fixes most of the pref env issues related to OOP frames, but there are still a few remaining. In particular:

  1. There is some test harness code that expects flushPrefEnv to flush any preference environments, no matter which SpecialPowers instance they were created in. The works at the moment (mostly, and mostly by accident) for any SpecialPowers instances in the same process as the instance that flush is called in, but not for instances in remote processes.

  2. The pushPrefEnv code reads the current value of the preference in the child process to determine which value to restore. Unfortunately, there are some preferences whose changed values are never propagated to content processes, only their original values, which may lead to strange issues when used with this API. This is to say nothing of races.

  3. In some cases, when one of the issues in #2 arises, we may not get a preference observer notification for one of the preference changes, in which case the API will continue waiting forever for its changes to take effect, and will not resolve its returned promises, leading to hard-to-diagnose test timeouts.

  4. This code is all horrendously complex, and difficult to maintain.

And, while not strictly related to fission, there's also,

  1. As reported in bug 1557397, when the API believes that all of the preferences it is asked to change have their required values, it returns immediately, without pushing anything onto the undo stack, leading the next popPrefEnv call to pop the wrong environment off of the stack, causing any number of arcane bugs to popup.
Attachment #9073659 - Attachment description: Bug 1561061: Move SpecialPowers pref env code to parent and make sane-ish. r=nika → Bug 1561061: Move SpecialPowers pref env code to parent and make sane-ish. r=aswan
Blocks: 1541173
No longer blocks: fission
Status: NEW → ASSIGNED
Priority: -- → P2
Fission Milestone: --- → M4
Blocks: fission-mochitests
No longer blocks: 1541173
Blocks: 1541173
No longer blocks: fission-mochitests
https://hg.mozilla.org/integration/mozilla-inbound/rev/c2d0956f41d82e76c682f829807e818863cd802a
Bug 1561061: Move SpecialPowers pref env code to parent and make sane-ish. r=aswan
https://hg.mozilla.org/integration/mozilla-inbound/rev/6fc41e51bcee6e1854bcacbf7356f30a9f47463b
Bug 1561061: Follow-up: Fix another test race in pushPrefEnv. r=bustage CLOSED TREE
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/72cd895b1613
Move SpecialPowers pref env code to parent and make sane-ish. r=aswan
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Status: RESOLVED → REOPENED
Flags: needinfo?(kmaglione+bmo)
Resolution: FIXED → ---
Target Milestone: mozilla69 → ---
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Flags: needinfo?(kmaglione+bmo)
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: