Fix memory leak with ScriptedIdleTaskController
If there is an untriggered idle task when the document is gone, it introduces memory leak because IdleRequestCallbackWrapper keeps a reference to the ScriptedIdleTaskController, making it live longer than the document. This patch fixes the issue by letting IdleRequestCallbackWrapper store a WeakPersistent instead. BUG=595155 Review-Url: https://codereview.chromium.org/2618893002 Cr-Commit-Position: refs/heads/master@{#441929}
Showing
Please register or sign in to comment