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

Issue 734358 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 742530
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

window.PerformanceObserver can be incorrectly garbage collected

Reported by yoshuawu...@gmail.com, Jun 17 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36

Steps to reproduce the problem:
1. create a new performanceObserver listening to 'frame', 'measure', 'navigation', 'resource', 'longtask' 
2. iterate over each handler, and trigger a callback from window.requestIdleCallback()
3. wait for 8 seconds, and the observer will stop firing new events

What is the expected behavior?
The performance observer should continue to fire until removed by disconnecting it

What went wrong?
I suspect the performance observer got garbage collected because no references were kept. By attaching it directly to the window it wasn't garbage collected anymore.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 59.0.3071.104  Channel: stable
OS Version: OS X 10.11.6
Flash Version: 

cc/ igrigorik - from the twitter thread: https://twitter.com/yoshuawuyts/status/876098840495091713

Source that I was running (except line 39-41 which contain the fix): https://github.com/yoshuawuyts/on-performance/blob/master/index.js
 
Labels: Needs-Triage-M59
Cc: brajkumar@chromium.org
Labels: Needs-Feedback
yoshuawuyts@ Could you please provide a sample test case to check this issue from chrome-TE end.

Thanks!
Mergedinto: 742530
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment