Chromium Code Reviews
DescriptionServiceWorker: Create a proxy when adding the worker to DevToolsManager
Currently ServiceWorkerDevToolsAgentHost is created on the UI thread in
ServiceWorkerDevToolsManager::WorkerCreated which is invoked on SetupOnUI, and
DevToolsProxy managing the agent is created in the task posted by SetupOnUI
which runs on the io thread. However, if the mojo interface which is connected
in the SetupOnUI fails to establish the connection to the renderer process,
OnDetach gets called before setting up the DevToolsProxy. This means the
ServiceWorkerDevToolsAgentHost is dangling even though EWInstance no longer has
any process. This patch is to fix that by creating DevToolsProxy at the same
time with WorkerCreated. This enables us to manage the lifetime of the agent
even if EmbeddedWorkerInstance fails making connection somehow.
BUG=712515
Review-Url: https://codereview.chromium.org/2823853005
Cr-Commit-Position: refs/heads/master@{#465504}
Committed: https://chromium.googlesource.com/chromium/src/+/6c2885ec2d91839b39a248c1461b5ecd7d857bf9
Patch Set 1 #
Total comments: 2
Patch Set 2 : Removed unnecessary nullptr #
Messages
Total messages: 13 (6 generated)
|
||||||||||||||||||||||||||||