Skip to content
Commit b76829e0 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Chromium LUCI CQ
Browse files

[cronet] Fix leak of dispatch_semaphore_t in CronetTestBase

The class CronetTestBase allocate a dispatch_semaphore_t to wait
for each task completion but does not destroy those semaphores
in -reset method. This means that there is an ever growing cache
of semaphores (also known as a leak).

Destroy the semaphores when the wait has been successful (as it
won't be possible for the semaphore to be re-signaled until the
main thread get the control back anyway).

Bug: none
Change-Id: I8fc54597066f1662323737fdeb5cabc5285dc03c
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2851237


Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarZhongyi Shi <zhongyi@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880993}
parent 692e1b98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment