make BackgroundPageThumbs fission compatible
Categories
(Firefox :: New Tab Page, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: surkov, Assigned: enndeakin)
References
Details
Attachments
(1 file)
similar to bug bug 1576911, the logic should be switched to drawSnapshot API which is fission compatible (see bug 1475139). Beyond this, it seems we could do a number cleanup/code improvements here. Will file those as dependent bugs.
Comment 1•4 years ago
|
||
metadata for the file says bugs are tracked in New Tab Page so let's move this there.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Can you point us to some documentation around what the best practice is for remediation here?
Comment 4•4 years ago
|
||
(In reply to Gavin Suntop [:gvn] (he/they) from comment #3)
Can you point us to some documentation around what the best practice is for remediation here?
BackgroundPageThumbs uses a frame script ( backgroundPageThumbsContent.js ) right now. This is not compatible with fission. comment #0 suggests you could use the drawSnapshot
API instead of having the frame script take a screenshot and then passing that back to the parent.
If more JS still needs to run in the content process for the background page thumbs code to work (which I'm not sure about) it would need to be converted to using a JSWindowActor. See e.g. https://phabricator.services.mozilla.com/D50584 for an example, https://firefox-source-docs.mozilla.org/dom/Fission.html#jswindowactor and https://firefox-source-docs.mozilla.org/dom/Fission.html#how-to-port-from-message-manager-and-framescripts-to-jswindowactors etc. for docs.
One issue I suspect may be problematic here is that AIUI there is currently no way to limit where we run JSWindowActors, except by URI. But in this case, we really want the actor to only run in the browser/docshell created for the background page thumbs. It'd be worth liaising directly with the fission team to figure that part out, if you end up needing to run JS.
Does that help?
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Assignee | ||
Comment 8•3 years ago
|
||
Now that windowless browser supports fission, I now have the background page thumbnailer creating new processes for each domain that it loads. However, this requires passing 'Ci.nsIWebBrowserChrome.CHROME_REMOTE_WINDOW | Ci.nsIWebBrowserChrome.CHROME_FISSION_WINDOW' to AppShell::CreateWindowlessBrowser when fission is enabled. I know we want to avoid using the fission.autostart preference, but it seems like this is a case where it can't be avoided. Does this sound right?
Comment 9•3 years ago
|
||
Yes, I believe background processes which need to create windows unrelated to any other existing window and need to pick whether those windows have Fission enabled will need to check the fission.autostart
pref directly still.
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Pushed by neil@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1f04d5ddcee0 switch background page thumbs service to use drawSnapshot and an actor instead of a framescript, r=adw
Comment 11•3 years ago
|
||
bugherder |
Description
•