Move all CDP packet reading/writing to Connection
Categories
(Remote Protocol :: Agent, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
For now, we try to construct CDP packets from Session classes, whereas we already process some particular aspects of it from Connection (to get the sessionId).
I believe it would be easier to follow if Connection was fully responsive of intepreting incoming packet completely (all fiels: id, method, params and sessionId), as well as crafting the outgoing packets sent to the client (command response, events and errors).
A side effect of doing that is that sessions are doing much less, which may help coalescing Domain and Session classes.
Assignee | ||
Comment 1•5 years ago
|
||
This helps sharing a single implementation of how the JSON objects
are read and written from/to the WebSocket connection.
Also, by delegating the command calls to the Session via Session.execute
and expecting a promise with a resolution or rejection, we make error
handling of command calls clearer and unified.
Assignee | ||
Comment 2•5 years ago
|
||
Making this block the gutenberg work as it will help bug 1562740 and the patch to call content's domain code from the parent one.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Description
•