• Raymond Toy's avatar
    Move value setter warning code completely to AudioParamTimeline · 4d393f49
    Raymond Toy authored
    Move the implemetation completely to the AudioParamTimeline class so
    we can lock the event list completely to prevent the audio thread from
    mutating the event list.
    
    The original implementation had two function calls: one to find an
    event index and another to print the warning.  However, the audio thread
    could have mutated the event list between these calls, so the event
    index could be invalid.
    
    Bug: 778927
    Test: Repro case doesn't fail DCHECK in debug build
    Change-Id: Ied1d8d5128a316aba3c8d59589e1f305a5a2a26b
    Reviewed-on: https://chromium-review.googlesource.com/741450
    Commit-Queue: Raymond Toy <rtoy@chromium.org>
    Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#513163}
    4d393f49
AudioParamTimeline.cpp 73.2 KB