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)
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
|
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a51231751f3 Move all CDP's JSON packet handling to Connection. r=remote-protocol-reviewers,jdescottes,ato
Comment 4•5 years ago
|
||
bugherder |
Description
•