• Peter Marshall's avatar
    DevTools: Set up DevToolsAgent with an interrupting connection · eab48ceb
    Peter Marshall authored
    When a worker is stuck in JS when we call AttachDevToolsSession, the
    the call won't go through until JS execution finishes as there is no
    interrupting mechanism (equivalent to io_session) at the Agent level.
    
    This CL adds different behaviour to DevToolsAgent for the worker and
    non-worker cases. Non-workers now use the IO thread to dispatch calls
    from the browser over the DevToolsAgent mojo interface. This is similar
    to how IOSession works and achieves the same results.
    
    We also send all protocol messages on IOSession for workers. We can't do
    this for non-workers as they need to have an ordering guarantee with
    page navigation. This is done through using associated mojo channels for
    Session, Agent and FrameNavigationControl. We don't associate the mojo
    channel for workers though.
    
    Bug: 1010534
    Change-Id: Id6b3d2ee0cf86f1a0b046b4e59ec1851ca07d7eb
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951003Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: default avatarMike West <mkwst@chromium.org>
    Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
    Reviewed-by: default avatarSigurd Schneider <sigurds@chromium.org>
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#733963}
    eab48ceb
worker_devtools_agent_host.cc 3.08 KB