[webkit-dev] IPC implementation help in haiku's webkit port

Rajagopalan Gangadharan g.raju2000 at gmail.com
Mon May 27 23:49:55 PDT 2019


Hello Everybody,

I stumbled upon a problem in an attempt to port webkit to haiku. Before
everything I would like to take few moments to explain about state of the
port.

1) We have a well maintained WebKitLegacy port on haiku.
2) Now in the process of porting latest webkit to haiku currently at fixing
IPC. We didnt want to use BSD sockets and would like to use Native
messaging framework [BMessage :
https://www.haiku-os.org/docs/api/classBMessage.html ] because our native
application waits for BMessage in its main thread as a result we cant wait
for both sockets and BMessage on same thread. Also we would like to
maintain the haiku ecosystem :) .

3) We need process id of the intended process we would like to connect to
send data [BMessenger:
https://www.haiku-os.org/docs/api/classBMessenger.html ] So instead of
exchanging socket id's we would just exchange pid's

4) We were able to successfully deliver and process the messages. Currently
we were able to proceed until creating a connection between network process
and webprocess(NetworkConnectionToWebProcess).

Now where we are stuck is that After creating a connection between network
process and webprocess we would have to reply back to webprocess about the
connection info( pid of network process in our case ). I see the reply is
an alias of DelayedReply(CompletionHandler<Attachment&>) according to the
derived sources.
Unfortunately the webprocess is indefinitely waiting for reply from
webprocessproxy for which we are unable to "reply" .

Could anyone point me where I would have went wrong or what could be done
to fix this and any better ways for implementing this.

Please check the source references for more info:
NetworkProcessProxy: [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/6bf81d79669be06b4efd9d8ced4139cbe07216b2/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp#L150
]

NetworkProcess [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/6bf81d79669be06b4efd9d8ced4139cbe07216b2/Source/WebKit/NetworkProcess/haiku/NetworkProcessHaiku.cpp#L98
]

ConnectionHaiku : [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/ipc-iteration2/Source/WebKit/Platform/IPC/haiku/ConnectionHaiku.cpp
 ]

Attachment : [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/blob/ipc-iteration2/Source/WebKit/Platform/IPC/haiku/AttachmentHaiku.cpp
 ]
I believe these places are currently in focus
For further reference please check [
https://github.com/RAJAGOPALAN-GANGADHARAN/webkit/tree/ipc-iteration2]

Thank you
Regards
G.Rajagopalan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20190528/b8fc9cfa/attachment.html>


More information about the webkit-dev mailing list