• Chris Hamilton's avatar
    Fix use after free in I18nSourceStream. · dbd7f872
    Chris Hamilton authored
    This adds explicit lifetime management between URLRequestChromeJob and
    URLDataSourceImpl, by having the job own a shared_refptr to the data
    source. This allows the data source to be detached from the backend
    yet remain alive as long as the request job is still alive (which
    eventually wants to use its i18n template replacements map).
    
    BUG=863318
    
    Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
    Change-Id: I84caa70dff1e1c65ac430fca11656e85e4a6eebd
    Reviewed-on: https://chromium-review.googlesource.com/1156625
    Commit-Queue: Chris Hamilton <chrisha@chromium.org>
    Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
    Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#579994}
    dbd7f872
i18n_source_stream.h 1.99 KB