WorkletGlobalScopeProxy should be GC-managed object in order to avoid that GC graphs are disjointed. For example, PaintWorkletGlobalScopeProxy has a persistent holder for PaintWorkletGlobalScope and the graphs are disjointed at that point.
This seems to be useful for merging ThreadedWorklet into Worklet.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5 commit 1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5 Author: Hiroki Nakagawa <nhiroki@chromium.org> Date: Mon Jun 12 03:07:47 2017 Worker: Tighten the visibility of functions on ThreadedMessagingProxyBase This is a refactoring CL and does not change behavior. This CL... - moves CreateWorkerThread() from 'protected' to 'private'. - moves getters from 'public' to 'protected'. - renames GetThreadableLoadingContext() to CreateThreadableLoadingContext() because this returns a newly created context. - adds class-level comments and thread checks. Bug: 673711 , 719775 Change-Id: I855e43eba5f51858cf0afb68a074682de8ef0523 Reviewed-on: https://chromium-review.googlesource.com/527714 Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#478541} [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/core/workers/DedicatedWorkerMessagingProxy.cpp [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/core/workers/DedicatedWorkerMessagingProxy.h [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.cpp [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.cpp [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.h [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp [modify] https://crrev.com/1ee2c8a31e8dd7be86f1acde8aac1f7411bf06b5/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/19663e1dc06313c083dd486197f7a303b55f6577 commit 19663e1dc06313c083dd486197f7a303b55f6577 Author: Hiroki Nakagawa <nhiroki@chromium.org> Date: Thu Jun 15 04:29:16 2017 Worker: Make ThreadedMessagingProxyBase and WorkletGlobalScopeProxy GC-managed objects Primary motivation of this change is to make WorkletGlobalScopeProxy GC-managed so that GC-graphs are unified, and to simplify proxy lifetime management for merging ThreadedWorklet into Worklet. To achieve this, we also need to make ThreadedMessagingProxyBase GC-managed because a proxy for worklets implements both the interfaces and is differently handled depending on an accessor class: a class shared among workers/worklets handles the proxy as ThreadedMessagingProxyBase and a worklet-specific class handles it as WorkletGlobalScopeProxy. <Class hierarchy> ThreadedMessagingProxyBase <- InProcessWorkerMessagingProxy <- DedicatedWorkerMessagingProxy <- CompositorWorkerMessagingProxy <- ThreadedWorkletMessagingProxy <- ThreadedWorkletMessagingProxy (also implements WorkletGlobalScopeProxy) <- AnimationWorkletMessagingProxy <- AudioWorkletMessagingProxy Bug: 719775 , 727194 Change-Id: I7f63bfc4f69009b57f08599241ea3c8801e65a77 Reviewed-on: https://chromium-review.googlesource.com/527716 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#479603} [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/DedicatedWorkerMessagingProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/InProcessWorkerBase.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedObjectProxyBase.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedWorklet.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedWorklet.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/Worklet.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/Worklet.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/core/workers/WorkletGlobalScopeProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/compositorworker/AnimationWorklet.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/csspaint/PaintWorklet.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/csspaint/PaintWorklet.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScopeProxy.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/webaudio/AudioWorklet.h [modify] https://crrev.com/19663e1dc06313c083dd486197f7a303b55f6577/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
Comment 1 by nhiroki@chromium.org
, Jun 5 2017Owner: nhiroki@chromium.org
Status: Started (was: Available)