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

Issue 887463003: Turn WorkerLoaderProxy into a threadsafe, ref-counted object. (Closed)

Created:
5 years, 10 months ago by sof
Modified:
5 years, 10 months ago
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, tyoshino+watch_chromium.org, aandrey+blink_chromium.org, tzik, yhirano+watch_chromium.org, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, gavinp+loader_chromium.org, kinuko+worker_chromium.org, horo+watch_chromium.org, blink-reviews-wtf_chromium.org, Nate Chapin, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Turn WorkerLoaderProxy into a threadsafe, ref-counted object. To avoid relying on the loader client bridge's WorkerLoaderProxy reference remaining valid until all uses of that bridge object have been finalized, turn the WorkerLoaderProxy object into a threadsafe, ref-counted object. Along with that, make the WorkerLoaderProxy implementation more flexible, allowing the "backend" that actually proxies calls between the worker and the main thread context to be detached when it is destructed. This to allow it to be finalized before the WorkerLoaderProxy instance can be. WorkerLoaderProxyProvider defines that "backend" interface. R=kinuko,haraken BUG=451344 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189549

Patch Set 1 #

Patch Set 2 : remove incorrect FetchManager assert; shouldn't have been included. #

Patch Set 3 : Explicitly detach instead of using a weak abstraction #

Total comments: 5

Patch Set 4 : Clarify WorkerLoaderProxyProvider's obligations on shutdown #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -124 lines) Patch
M Source/core/core.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/MemoryCache.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/WorkerLoaderClientBridge.h View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/loader/WorkerLoaderClientBridge.cpp View 10 chunks +11 lines, -11 lines 0 comments Download
M Source/core/loader/WorkerThreadableLoader.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/loader/WorkerThreadableLoader.cpp View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M Source/core/workers/DedicatedWorkerThread.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/workers/DedicatedWorkerThread.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/workers/SharedWorkerThread.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/workers/SharedWorkerThread.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/workers/WorkerLoaderProxy.h View 1 2 3 2 chunks +42 lines, -5 lines 0 comments Download
A Source/core/workers/WorkerLoaderProxy.cpp View 1 2 1 chunk +48 lines, -0 lines 0 comments Download
M Source/core/workers/WorkerMessagingProxy.h View 1 2 4 chunks +13 lines, -8 lines 0 comments Download
M Source/core/workers/WorkerMessagingProxy.cpp View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/workers/WorkerThread.h View 1 2 5 chunks +9 lines, -4 lines 0 comments Download
M Source/core/workers/WorkerThread.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerThread.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerThread.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/websockets/WorkerWebSocketChannel.h View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/modules/websockets/WorkerWebSocketChannel.cpp View 11 chunks +14 lines, -14 lines 0 comments Download
M Source/web/WebEmbeddedWorkerImpl.h View 1 2 5 chunks +10 lines, -6 lines 0 comments Download
M Source/web/WebEmbeddedWorkerImpl.cpp View 1 2 5 chunks +20 lines, -38 lines 0 comments Download
M Source/web/WebSharedWorkerImpl.h View 1 2 6 chunks +10 lines, -8 lines 0 comments Download
M Source/web/WebSharedWorkerImpl.cpp View 1 2 4 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (6 generated)
kinuko
Hi, Thanks very much for making this patch. This patch's bigger but to me this ...
5 years, 10 months ago (2015-02-02 14:56:05 UTC) #2
sof
On 2015/02/02 14:56:05, kinuko wrote: > Hi, > > Thanks very much for making this ...
5 years, 10 months ago (2015-02-03 21:52:46 UTC) #3
sof
I adopted that weak-like unregistration scheme instead; let me know if that fits with what ...
5 years, 10 months ago (2015-02-04 22:50:01 UTC) #5
kinuko
Thanks, this LGTM! (With two nit comments) https://codereview.chromium.org/887463003/diff/40001/Source/core/workers/WorkerLoaderProxy.h File Source/core/workers/WorkerLoaderProxy.h (right): https://codereview.chromium.org/887463003/diff/40001/Source/core/workers/WorkerLoaderProxy.h#newcode79 Source/core/workers/WorkerLoaderProxy.h:79: // no ...
5 years, 10 months ago (2015-02-05 01:41:16 UTC) #6
sof
Thanks for the quick review. https://codereview.chromium.org/887463003/diff/40001/Source/core/workers/WorkerLoaderProxy.h File Source/core/workers/WorkerLoaderProxy.h (right): https://codereview.chromium.org/887463003/diff/40001/Source/core/workers/WorkerLoaderProxy.h#newcode79 Source/core/workers/WorkerLoaderProxy.h:79: // no longer be ...
5 years, 10 months ago (2015-02-05 08:05:27 UTC) #8
kinuko
still lgtm https://codereview.chromium.org/887463003/diff/40001/Source/web/WebEmbeddedWorkerImpl.h File Source/web/WebEmbeddedWorkerImpl.h (right): https://codereview.chromium.org/887463003/diff/40001/Source/web/WebEmbeddedWorkerImpl.h#newcode97 Source/web/WebEmbeddedWorkerImpl.h:97: virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) override; On 2015/02/05 08:05:27, ...
5 years, 10 months ago (2015-02-05 08:58:06 UTC) #9
sof
On 2015/02/05 08:58:06, kinuko wrote: > still lgtm > > https://codereview.chromium.org/887463003/diff/40001/Source/web/WebEmbeddedWorkerImpl.h > File Source/web/WebEmbeddedWorkerImpl.h (right): ...
5 years, 10 months ago (2015-02-05 09:01:30 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/887463003/60001
5 years, 10 months ago (2015-02-05 09:03:14 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/25808)
5 years, 10 months ago (2015-02-05 09:11:14 UTC) #14
kinuko
You'll need owner review for Source/modules/websockets and Source/web..
5 years, 10 months ago (2015-02-05 09:15:09 UTC) #15
sof
On 2015/02/05 09:15:09, kinuko wrote: > You'll need owner review for Source/modules/websockets and Source/web.. haraken@, ...
5 years, 10 months ago (2015-02-05 09:29:50 UTC) #16
haraken
On 2015/02/05 09:29:50, sof wrote: > On 2015/02/05 09:15:09, kinuko wrote: > > You'll need ...
5 years, 10 months ago (2015-02-05 09:39:32 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/887463003/60001
5 years, 10 months ago (2015-02-05 09:45:24 UTC) #19
commit-bot: I haz the power
5 years, 10 months ago (2015-02-05 10:31:25 UTC) #20
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189549

Powered by Google App Engine
This is Rietveld 408576698