New issue
Advanced search Search tips

Issue 676289 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 595155
Owner: ----
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 517298
issue 674819



Sign in to add a comment

Uninvoked/Canceled idle callbacks make layout tests leak

Project Member Reported by xiaoche...@chromium.org, Dec 21 2016

Issue description

Chrome Version: Linux ToT

What steps will reproduce the problem?
(1) Run the following layout test with content_shell --run-layout-test --enable-leak-detection.
You may need to modify paths to testharness.js and testharnessreport.js to your local path.

<!doctype html>
<script src="testharness.js"></script>
<script src="testharnessreport.js"></script>
<script>
const t = async_test();
// The presense or value of timeout is irrelevant to the repro of this bug.
requestIdleCallback(() => {}, {timeout: 100});
t.done();
</script>

What is the expected result?
Test passes

What happens instead?
Test leaks: ({"numberOfLiveSuspendableObjects":[2,3]})


This bug blocks the implementation of idle time spell checker, which requests idle callbacks within Blink.
 
Also tried with requestAnimationFrame and setTimeout:

<!doctype html>
<script src="testharness.js"></script>
<script src="testharnessreport.js"></script>
<script>
const t = async_test();
// The presense or value of timeout is irrelevant to the repro of this bug.
requestIdleCallback(() => {}, {timeout: 100});
requestAnimationFrame(() => {console.log('rAF')});
setTimeout(() => {console.log('setTimeout 0')}, 0);
setTimeout(() => {console.log('setTimeout 5000')}, 5000);
t.done();
</script>

Result:
- rAF always gets invoked and doesn't cause leak
- setTimeout may or may not be invoked, depending on its timeout; It doesn't cause leak in either case

Guess we need some similar cleanup to idle callbacks at the end of each layout test
Blocking: 674819
This bug also caused the revert of r440058, which aimed at having some better tools for spell-checking layout tests
Cc: skyos...@chromium.org
Hi Sami, could you help me (once again) with this bug?

Thanks!
Summary: Uninvoked/Canceled idle callbacks make layout tests leak (was: Uninvoked idle callbacks make layout tests leak)
It leaks even if the callback is canceled...

<!doctype html>
<script src="testharness.js"></script>
<script src="testharnessreport.js"></script>
<script>
const t = async_test();
const handle = requestIdleCallback(() => {});
cancelIdleCallback(handle);
t.done();
</script>

#LEAK - renderer pid 87359 ({"numberOfLiveSuspendableObjects":[2,3]})
Mergedinto: 595155
Status: Duplicate (was: Untriaged)

Sign in to add a comment