• RJ Ascani's avatar
    [Fuchsia] Move CDM data file i/o off main thread · 9c790662
    RJ Ascani authored
    The FuchsiaCdmManager needs to create directories for each origin to
    pass to the platform CDM services to fulfill EME origin isolation
    requirements. The FuchsiaCdmManager runs on the main thread and the
    calls to CreateDirectoryAndGetError are potentially blocking. This CL
    moves the directory creation step to a background task.
    
    This is a reland of crrev.com/c/2500532. Since directory creation was
    pushed to the threadpool, the order in which CDM requests are processed
    is no longer certain. A couple of the tests were using the error handler
    on a particular ContentDecryptionModulePtr to determine when to
    terminate the RunLoop. The quit condition now requires all
    ContentDecryptionModulePtrs to have their error handlers fired.
    
    Bug: 1140655
    Change-Id: Ie28885c1736861a1bba66acd3e9aa6f26f1208bd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508031
    Commit-Queue: Wez <wez@chromium.org>
    Reviewed-by: default avatarWez <wez@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#822958}
    9c790662
fuchsia_cdm_manager.cc 10.4 KB