servo
servo copied to clipboard
net: Use callbacks instead of IPC channels in the `ImageCache` API
Previously, the ImageCache would inform consumers of changes to image
availability by messaging an IPC channel. This isn't great, because it
requires serialization and deserialization. Nowadays, ImageCaches are
always owned by the same Global that uses them. This change replaces
the IPC channel with callback that implements Send.
For the case of normal HTML document images, the results are still sent over the pre-existing Crossbeam channel that was connected via an IPC route. A followup change might eliminate that channel entirely.
Testing: This should not change observable behavior so is covered by existing tests. Fixes: #24338.
Nice improvement!