Castanets
Castanets copied to clipboard
Use SharedMemory for Data Pipe without data transfer
Goal : Load resources directly on renderer side device without network transfer.
Network service sends Mojo DataPipe to transfer the loaded resources to renderer. The DataPipe has a ring buffer consist of shared memory. The DataPipe is delivered by URLLoaderClient::OnStartLoadingResponseBody(mojo::ScopedDataPipeConsumerHandle body) mojo interface.
For browser side navigation scenario, Although the Renderer and Utility have Unix domain socket connections on the same device by (#112), the shared memory handle of DataPipe can not be passed from Utility to Renderer because the Message Pipe of |URLLoaderClient| mojo interface created by Browser and connected on TCP socket channel.
The Shared Memory Handle of DataPipe should be shared between utility and renderer on the same device even through bypassing TCP socket.
[WIP] Use SharedMemory named GUID for Renderer Side Resource Load.
- Create NamedSharedMemory with GUID for DataPipe in NetworkService
- Try to open the NamedSharedMemory with received GUID in Renderer https://github.com/is46-kim/Castanets/commit/b99ce495b7af41adacaa8a92f9ec708d9629366c
Loads resources properly in Renderer with WIP patch.
I requested PR https://github.com/Samsung/Castanets/pull/179 This patch sends NamedSharedMemory to share DataPipeConsumerHandle for URLLoaderClient mojo interface connected with TCP.