Issue metadata
Sign in to add a comment
|
window.PerformanceObserver can be incorrectly garbage collected
Reported by
yoshuawu...@gmail.com,
Jun 17 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: 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
,
Jun 19 2017
yoshuawuyts@ Could you please provide a sample test case to check this issue from chrome-TE end. Thanks!
,
Jul 28 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by ranjitkan@chromium.org
, Jun 19 2017