Closed Bug 2058719 Opened 4 months ago Closed 3 months ago

Flush sharedData between writing ppmm and reading cpmm

Categories

(WebExtensions :: General, defect)

defect

Tracking

(firefox155 fixed)

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: zombie, Assigned: zombie)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 external file)

I was working on something else, and ran into this test failure. Not sure if it's actually an issue under less artificial scenarios, but the fix seems logical.

Whiteboard: [addons-jira]

On startup the parent WebExtensionPolicy is built by
ExtensionProcessScript.initExtension, which reads Services.cpmm.sharedData.
That view only reflects Services.ppmm.sharedData writes after a flush.
initSharedData() writes the extension's restored dynamic content scripts to
ppmm just above, but the extension's own flush (Extension:Startup) happens
later. When several extensions restart together, an earlier extension's flush
also snapshots a later one's not-yet-restored scripts as empty. Either way the
policy can be built without the extension's content scripts, so after a restart
their content_parent contexts are spuriously rejected.

Flush before building the policy so the restored scripts are current.

Assignee: nobody → tomica
Status: NEW → ASSIGNED
Attachment #9617897 - Attachment description: Bug 2058719 - Flush sharedData before building the parent WebExtensionPolicy at startup. r?robwu → Bug 2058719 - Read dynamic content scripts from the extension when building the parent policy. r?robwu
Pushed by tjovanovic@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7db5327ceafd https://hg.mozilla.org/integration/autoland/rev/597402ad7acf Read dynamic content scripts from the extension when building the parent policy. r=robwu
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: