New issue
Advanced search Search tips

Issue 735830 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

ResizeObserver stops listening

Reported by acmesqua...@gmail.com, Jun 22 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3135.4 Safari/537.36

Steps to reproduce the problem:
1. Load page and wait 8-10 seconds
2. Resize an element being observed by a ResizeObserver

What is the expected behavior?

What went wrong?
ResizeObserver initially works, but then stops responding.

Did this work before? Yes 60.0.3112.40

Does this work in other browsers? N/A

Chrome version: 61.0.3135.4  Channel: dev
OS Version: 
Flash Version:
 
resize_observer_bug.html
556 bytes View Download
Cc: rbasuvula@chromium.org
Labels: M-61 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Tested the issue on chrome#beta #60.0.3112.40 #Dev 61.0.3135.4 & Canary 56.0.2891.0 in Ubuntu 14.04 and was able to reproduce the issue.

Observations:
1.Pixel(250*250)resize observer is not visible in latest canary,Beta and older versions(M-50,M-45,M-35 & M-30) but visible in Dev build(61.0.3135.4).Please find the screen shot for reference.

This is a Non-Regression issue since seeing this from M30 #30.0.1549.0, Making the status to Untriaged so that the issue would get addressed.

Note : Able to reproduce the issue in MAC 10.12 and Win 10.0.

Thank you.
735830(Dev).png
64.1 KB View Download
735830(Beta).png
47.7 KB View Download

Comment 2 by e...@chromium.org, Jun 26 2017

Owner: atotic@chromium.org
Status: Assigned (was: Untriaged)
Confirmed. Starting work.
Cc: bashi@chromium.org
@bashi:
The root cause of this bug is that javascript callback gets garbage collected, and ResizeObserverCallback.callback_ is null. This is why notifications stop.

This bug was introduced in your CL 
https://chromium-review.googlesource.com/c/515183

I am not an Oilpan expert, so I am not sure what the right fix is. To me, it looks like the problem is this:

ResizeObserverCallback is supposed to be kept alive by reference from ResizeObserver. This used to work:

Working code had:
Member<ResizeObserverCallback> callback_;

New code has:
const TraceWrapperMember<ResizeObserverCallback> callback_;
const Member<Delegate> delegate_;

For some reason, the new code is not keeping ResizeObserverCallback.callback_ alive.

Can you help?


Project Member

Comment 5 by bugdroid1@chromium.org, Aug 9 2017

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

commit a5d05f5066da6c64cec104cf766e566273a471be
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Aug 09 21:05:40 2017

Added test case to detect garbage collection problems

Bug:  735830 
Change-Id: I94d3777b2c242b3ff9e496649472d70b46e43fd2
Reviewed-on: https://chromium-review.googlesource.com/609209
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493136}
[modify] https://crrev.com/a5d05f5066da6c64cec104cf766e566273a471be/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/a5d05f5066da6c64cec104cf766e566273a471be/third_party/WebKit/LayoutTests/resize-observer/garbage_collection.html

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 10 2017

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

commit 850ef295da299a0912606a9244494f03eb113d5e
Author: Kenichi Ishibashi <bashi@chromium.org>
Date: Thu Aug 10 05:10:38 2017

ElementRareData should trace ResizeObservers

As the spec said[1], we have to make sure that ResizeObserver remains
alive when the observer is observing a target. Before this CL we don't
trace ResizeObserver from ElementRareData which caused miscollection
of ResizeObserver.

[1] https://wicg.github.io/ResizeObserver/#lifetime

BUG= 735830 

Change-Id: I66c7a7544936345d27d81bde741df474abc17097
Reviewed-on: https://chromium-review.googlesource.com/608982
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493241}
[modify] https://crrev.com/850ef295da299a0912606a9244494f03eb113d5e/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/850ef295da299a0912606a9244494f03eb113d5e/third_party/WebKit/Source/core/dom/ElementRareData.cpp

Comment 7 by atotic@chromium.org, Aug 10 2017

Status: Fixed (was: Assigned)

Sign in to add a comment