Replace ref-counted TaskQueueManager::DeletionSentinel with a WeakPtr
DeletionSentinel may fail to detect TaskQueueManager deletion on a nested message loop: If there's a nested message loop that spins in task_annotator_.RunTask() at line 531, ProcessTaskFromWorkQueue() is reentered. As both outer and inner PTFWQ hold a ref to the DeletionSentinel instance, protect->HasOneRef() at line 534 doesn't hit even when the TaskQueueManager is gone. This CL replaces it with WeakPtr that covers the reentered case. Change-Id: Ia15947fcac399dc45994b0df7514a3872c6ba25c Reviewed-on: https://chromium-review.googlesource.com/721219 Commit-Queue: Taiju Tsuiki <tzik@chromium.org> Reviewed-by:Alex Clarke <alexclarke@chromium.org> Reviewed-by:
Alexander Timin <altimin@chromium.org> Cr-Commit-Position: refs/heads/master@{#509322}
Showing
Please register or sign in to comment