• Matt Menke's avatar
    NetworkService: Fix a pair of bugs in DataPipeElementReader. · ddd21488
    Matt Menke authored
    When a Read() call finished asynchronously, it was clearing its buf_
    pointer after calling into its consumer. If its consumer called Read()
    again, that could have resulted in populating buf_ again, which would
    then incorrectly be cleared by the higher level call.
    
    Also, if Init() interrupted a previous call to Init(), the callback to
    the first Init() call was not being cancelled.
    
    Bug: 794330
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
    Change-Id: I71faee5bcde302acd1962e55b4f2bb75d8c31c8d
    Reviewed-on: https://chromium-review.googlesource.com/825843
    Commit-Queue: Matt Menke <mmenke@chromium.org>
    Reviewed-by: default avatarRandy Smith <rdsmith@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#524448}
    ddd21488
BUILD.gn 86.4 KB