New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 619042 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Consider updating CompositedProperties on main before sending the proxy

Project Member Reported by majidvp@chromium.org, Jun 10 2016

Issue description

Currently we update composited proxy count on an element on the main, an on the worker once the message is received.

jbroman@ has pointed out the following side effect of this due to in-flight proxies.

Suppose the following code:
   compositorworker.postMessage([new CompositorProxy($el)]);

This can lead to the following sequence of events:

> - main thread creates CompositorProxy
> - incrementCompositorProxiedPropertiesForElement, element needs style recalc
> - main thread posts message to compositor proxy
> - document lifecycle runs, beginning with style recalc (possibly inducing
> layout, compositing update, paint, etc.)
> - main thread proxy loses last reference and is collected
> - decrementCompositorProxiedPropertiesForElement, element needs style recalc
> - document lifecycle runs, beginning with style recalc (possibly inducing
> layout, compositing update, paint, etc.)
> - CompositorWorker deserializes message and builds a CompositorProxy object
> - incrementCompositorProxiedPropertiesForElement, element needs style recalc
> - document lifecycle runs, beginning with style recalc (possibly inducing
> layout, compositing update, paint, etc.)

This is not incorrect, just that we may be promote/de-promite an element unnecessarily.

 
Owner: majidvp@chromium.org
Status: Assigned (was: Untriaged)
One proposed solution is to update the ref-count on main before sending the proxy.

This is possible but we need to be careful on when to decrement the reference count so that we avoid the current churn but also handle the case where the message is never received by the worker.

For context, I pointed it out in the review of this CL: https://codereview.chromium.org/1900423004/
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09ec44387526f6a420044a749cdcb63bb00595c1

commit 09ec44387526f6a420044a749cdcb63bb00595c1
Author: Majid Valipour <majidvp@chromium.org>
Date: Thu Jun 22 21:16:25 2017

Remove CompositorProxy, CompositorMutableState and friends

CompositorProxy is a used by CompositorWorker which is being superseded by
AnimationWorklet. Given that AnimationWorklet is not going to use
CompositorProxy we are removing it and other related classes.

This also means removing tests that where mainly associated with  CompsitorProxy
functionality.


Bug:  686897 ,  619042 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I7fa749c83e74fa65e8271d2111ebc9ae2e872ebb
Reviewed-on: https://chromium-review.googlesource.com/527455
Commit-Queue: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Ojan Vafai <ojan@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Chris harrelson <chrishtr@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481663}
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/SmokeTests
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/fast/dom/CompositorProxy/proxy-forces-layer.html
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/basic-plumbing-main-to-worker.html
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/basic-plumbing-worker-to-main.html
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-attribute-change-worker.html
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-attribute-change.html
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-disconnect-worker.html
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-disconnect.html
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-postmessage.html
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-disconnect.js
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-echo.js
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-compositor-worker-expected.txt
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/bindings/core/v8/serialization/SerializationTag.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/animation/BUILD.gn
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/animation/CompositorAnimator.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/animation/CompositorMutatorImpl.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/animation/CompositorMutatorImpl.h
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/animation/CompositorProxyClientImpl.cpp
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/animation/CompositorProxyClientImpl.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/AnimationWorkletProxyClient.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/BUILD.gn
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/dom/CompositorProxiedPropertySet.cpp
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/dom/CompositorProxiedPropertySet.h
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/dom/CompositorProxy.h
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/dom/CompositorProxy.idl
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/core/dom/CompositorProxyClient.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/CompositorWorkerProxyClient.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/ElementRareData.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/ElementRareData.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/StyleChangeReason.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/dom/StyleChangeReason.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/layout/LayoutInline.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/layout/LayoutTableRow.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletProxyClientImpl.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletProxyClientImpl.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerProxyClientImpl.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerProxyClientImpl.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/graphics/CompositingReasons.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/graphics/CompositorElementId.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/graphics/CompositorElementId.h
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/platform/graphics/CompositorMutableState.cpp
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/platform/graphics/CompositorMutableState.h
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.cpp
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/platform/graphics/CompositorMutableStateProvider.h
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/platform/graphics/CompositorMutableStateTest.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/graphics/CompositorMutator.h
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/platform/graphics/CompositorMutatorClientTest.cpp
[modify] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/web/tests/CompositorWorkerTest.cpp
[delete] https://crrev.com/3e164f76405e21777fae49bd221e8d86e7df4bfd/third_party/WebKit/Source/web/tests/data/compositor-proxy-basic.html
[add] https://crrev.com/09ec44387526f6a420044a749cdcb63bb00595c1/third_party/WebKit/Source/web/tests/data/compositor-worker-basic.html

Status: WontFix (was: Assigned)

Sign in to add a comment