ResizeObserver doesn't make the target Element alive. |
||
Issue descriptionhttps://wicg.github.io/ResizeObserver/#intro says that - observation will fire when watched Element is inserted/removed from DOM. However, ResizeObserver doesn't make the target Element alive, and it's possible that, after the target Element gets detached from the document tree, the target Element gets collected by GC before the observation caused by removal fires. Also there is nothing to make the ResizeObserver alive after the target Element gets detached from the document tree. We need to change the design of ResizeObserver in Blink, its relationship to Element, ResizeObserverController, etc. Also we need to perform wrapper-tracing appropriately in order to keep author functions (as callback functions) alive. IntersectionObserver has the same issue, too.
,
Mar 26 2018
I applied a temporary fix against a crash issue (not for this issue) at: https://chromium-review.googlesource.com/c/chromium/src/+/964075 (ResizeObserver) https://chromium-review.googlesource.com/c/chromium/src/+/975504 (IntersectionObserver) Now ResizeObserver and IntersectionObserver inherti from ActiveScriptWrappable, however, once this issue gets fixed, ResizeObserver and IntersectionObserver should not need to inherit from ActiveScriptWrappable. My patches above should be reverted then.
,
Aug 1
|
||
►
Sign in to add a comment |
||
Comment 1 by e...@chromium.org
, Mar 23 2018Status: Available (was: Untriaged)