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

Issue 2456733002: DevTools: Make WorkerThreadDebugger available for Worklets (Closed)

Created:
4 years, 1 month ago by nhiroki
Modified:
4 years, 1 month ago
Reviewers:
falken, haraken, dgozman
CC:
chromium-reviews, shans, tzik, apavlov+blink_chromium.org, kinuko+worker_chromium.org, jsbell+serviceworker_chromium.org, caseq+blink_chromium.org, hongchan, blink-reviews-bindings_chromium.org, devtools-reviews_chromium.org, blink-reviews, falken+watch_chromium.org, blink-worker-reviews_chromium.org, Eric Willigers, rjwright, lushnikov+blink_chromium.org, Raymond Toy, darktears, haraken, michaeln, shimazu+serviceworker_chromium.org, blink-reviews-animation_chromium.org, serviceworker-reviews, shimazu+worker_chromium.org, pfeldman+blink_chromium.org, kinuko+serviceworker, horo+watch_chromium.org, kozyatinskiy+blink_chromium.org, ikilpatrick
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: Make WorkerThreadDebugger available for Worklets DevTools is now disabled on Worklets because worker's debugger infrastructure(*) cannot host multiple worklet execution contexts on a single thread. (*) Worklet has been implemented on the worker infrastructure. To support it, this CL does following things: - This expands 1:1 relationship between WorkerThreadDebugger and WorkerThread to 1:M relationship. The debugger has a ID-WorkerThread map to manage multiple WorkerThreads. WorkerThread is added when worklet context is created and removed when the context is destroyed. - This decouples lifetime of WorkerThreadDebugger from lifetime of worklet context. Before this CL, the debugger has the same lifetime of the context. This prevents the debugger from hosting multiple contexts. After this CL, the debugger has the same lifetime of WorkerBackingThread, and attaches to worklet context when it's created. DesignDoc: https://docs.google.com/document/d/1v0dNB6jWMe7w6OeK-Vlnn-Q4qW7KI4m97LGnMefUx1k/edit BUG=646559 Committed: https://crrev.com/46d040e09230a0a04c61fc06d88636b9c3dfb627 Cr-Commit-Position: refs/heads/master@{#430558}

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix test failures #

Patch Set 3 : address review comments #

Patch Set 4 : fix layout tests #

Patch Set 5 : rebase #

Patch Set 6 : add layout tests #

Total comments: 2

Patch Set 7 : remove debugging code #

Total comments: 4

Patch Set 8 : address review comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -75 lines) Patch
A + third_party/WebKit/LayoutTests/http/tests/worklet/chromium/README.txt View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/worklet/chromium/paint-worklet-console.html View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/worklet/chromium/paint-worklet-console-expected.txt View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/worklet/chromium/resources/console-tests.js View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/worklet/chromium/resources/console-worklet-script.js View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/threaded/http/tests/worklet/chromium/README.txt View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/threaded/http/tests/worklet/chromium/animation-worklet-console.html View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/threaded/http/tests/worklet/chromium/animation-worklet-console-expected.txt View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-compositor-worker-expected.txt View 1 2 3 2 chunks +9 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp View 1 2 3 4 5 6 7 3 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.h View 1 2 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp View 1 2 3 4 5 6 7 6 chunks +62 lines, -36 lines 2 comments Download
M third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.cpp View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThread.h View 3 4 5 6 7 3 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThread.cpp View 1 2 3 4 5 6 7 5 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/AbstractAnimationWorkletThread.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.h View 1 chunk +0 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 72 (56 generated)
nhiroki
Hi, can you review this? I'll add layout tests in this CL later. Thanks.
4 years, 1 month ago (2016-11-02 10:29:27 UTC) #18
dgozman
Overall, looks very good! https://codereview.chromium.org/2456733002/diff/160001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp File third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp (right): https://codereview.chromium.org/2456733002/diff/160001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp#newcode158 third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp:158: DCHECK(m_workerThreads.contains(contextGroupId)); Just set m_pausedContentGroupId in ...
4 years, 1 month ago (2016-11-02 17:23:38 UTC) #19
nhiroki
Thank you for you comments and sorry for my delayed reply. I tackled with https://crbug.com/662812 ...
4 years, 1 month ago (2016-11-07 10:06:09 UTC) #45
nhiroki
+falken@ for reviews from worker's POV
4 years, 1 month ago (2016-11-07 10:07:38 UTC) #47
dgozman
lgtm We'll need inspector tests later, once we can connect to worklet: something similar to ...
4 years, 1 month ago (2016-11-07 18:47:55 UTC) #48
nhiroki
Thank you :) https://codereview.chromium.org/2456733002/diff/320001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp File third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp (right): https://codereview.chromium.org/2456733002/diff/320001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp#newcode179 third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp:179: DCHECK(m_workerThreads.contains(contextGroupId)) << contextGroupId; On 2016/11/07 18:47:55, ...
4 years, 1 month ago (2016-11-08 01:05:36 UTC) #50
nhiroki
On 2016/11/07 18:47:55, dgozman wrote: > lgtm > > We'll need inspector tests later, once ...
4 years, 1 month ago (2016-11-08 01:06:32 UTC) #52
nhiroki
+haraken, can you review bindings/core/v8/WorkerOrWorkletScriptController.cpp? Thanks.
4 years, 1 month ago (2016-11-08 01:07:15 UTC) #54
haraken
https://codereview.chromium.org/2456733002/diff/340001/third_party/WebKit/Source/core/workers/WorkerThread.cpp File third_party/WebKit/Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/2456733002/diff/340001/third_party/WebKit/Source/core/workers/WorkerThread.cpp#newcode128 third_party/WebKit/Source/core/workers/WorkerThread.cpp:128: return nextWorkerThreadId++; Shall we add a CHECK to crash ...
4 years, 1 month ago (2016-11-08 01:50:20 UTC) #55
nhiroki
Thank you. Updated. https://codereview.chromium.org/2456733002/diff/340001/third_party/WebKit/Source/core/workers/WorkerThread.cpp File third_party/WebKit/Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/2456733002/diff/340001/third_party/WebKit/Source/core/workers/WorkerThread.cpp#newcode128 third_party/WebKit/Source/core/workers/WorkerThread.cpp:128: return nextWorkerThreadId++; On 2016/11/08 01:50:20, haraken ...
4 years, 1 month ago (2016-11-08 06:06:51 UTC) #60
haraken
LGTM https://codereview.chromium.org/2456733002/diff/360001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp File third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp (right): https://codereview.chromium.org/2456733002/diff/360001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp#newcode173 third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp:173: return scriptState ? scriptState->context() : v8::Local<v8::Context>(); Is it ...
4 years, 1 month ago (2016-11-08 06:55:36 UTC) #61
nhiroki
Thank you for reviewing. https://codereview.chromium.org/2456733002/diff/360001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp File third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp (right): https://codereview.chromium.org/2456733002/diff/360001/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp#newcode173 third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp:173: return scriptState ? scriptState->context() : ...
4 years, 1 month ago (2016-11-08 09:38:19 UTC) #64
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/2456733002/360001
4 years, 1 month ago (2016-11-08 09:40:12 UTC) #67
commit-bot: I haz the power
Committed patchset #8 (id:360001)
4 years, 1 month ago (2016-11-08 09:46:05 UTC) #69
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/46d040e09230a0a04c61fc06d88636b9c3dfb627 Cr-Commit-Position: refs/heads/master@{#430558}
4 years, 1 month ago (2016-11-08 09:49:50 UTC) #71
xlai (Olivia)
4 years, 1 month ago (2016-11-08 16:51:51 UTC) #72
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:360001) has been created in
https://codereview.chromium.org/2485633004/ by xlai@chromium.org.

The reason for reverting is: The layout test animation-worklet-console.html is
failing on WebKit Linux Precise Leak bot:

https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Precis....

Powered by Google App Engine
This is Rietveld 408576698