Support remote windows in SpecialPowers.snapshotWindow
Categories
(Testing :: Mochitest, task)
Tracking
(Fission Milestone:M4, firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
A lot of the tests that currently use the snapshotWindow
API do so with cross-origin windows. Under Fission, these windows are also cross-process, and cannot be captured with the current API.
The most straightforward way to handle these windows is to take the snapshot in the process that owns the window, and return the ImageData. This would make the API asynchronous, and require that it return a promise.
Unfortunately, a lot of the existing callers are timing-sensitive, and can't easily be migrated to use an async API. So my plan is to simply return a synchronous snapshot when given an in-process window, and to return a promise in all other cases.
Ideally we'd just have separate sync and async APIs, but given the number of existing callers, I don't think it's worth the effort to migrate them all.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
This fixes several tests which snapshot remote windows under Fission. It also
changes some other arbitrary tests that don't use remote windows, which I
changed before I gave up on having an always-async API.
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c3db0f8fbc5b
https://hg.mozilla.org/mozilla-central/rev/4b826e607ca8
https://hg.mozilla.org/mozilla-central/rev/504f777152d8
Updated•5 years ago
|
Description
•