Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 2823853005: ServiceWorker: Create a proxy when adding the worker to DevToolsManager (Closed)

Created:
3 years, 8 months ago by shimazu
Modified:
3 years, 8 months ago
Reviewers:
falken
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -44 lines) Patch
M content/browser/service_worker/embedded_worker_instance.h View 3 chunks +5 lines, -4 lines 0 comments Download
M content/browser/service_worker/embedded_worker_instance.cc View 1 11 chunks +42 lines, -40 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
shimazu
ptal, thanks!
3 years, 8 months ago (2017-04-18 08:02:46 UTC) #4
falken
This seems complicated.... if I understand correctly, the failure mode we are trying to avoid ...
3 years, 8 months ago (2017-04-18 08:38:11 UTC) #5
shimazu
On 2017/04/18 08:38:11, falken wrote: > This seems complicated.... if I understand correctly, the failure ...
3 years, 8 months ago (2017-04-18 09:11:00 UTC) #6
shimazu
Oops. How do I publish the draft with replying? Copy and paste...? https://codereview.chromium.org/2823853005/diff/1/content/browser/service_worker/embedded_worker_instance.cc File content/browser/service_worker/embedded_worker_instance.cc ...
3 years, 8 months ago (2017-04-18 09:12:11 UTC) #7
falken
OK thanks for explaining. lgtm
3 years, 8 months ago (2017-04-19 03:35:57 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2823853005/20001
3 years, 8 months ago (2017-04-19 04:24:13 UTC) #10
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 05:49:05 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/6c2885ec2d91839b39a248c1461b...

Powered by Google App Engine
This is Rietveld 408576698