• Xiaohui Chen's avatar
    assistant: fix shutdown crash · 495c4fed
    Xiaohui Chen authored
    Fix shutdown crash in default_url_request_context_getter. Base class
    url_request_context_getter::OnDestruct() already posted the destruction
    to network_task_runner. This makes the thread join in
    default_url_request_context_getter crash because it is joining on the
    same thread.
    
    This cl removes the posting and joining logic in
    default_url_reqeust_context_getter since it is duplicate with the base
    class. We cannot create and hold the thread object either because that
    will implicitly join when destrcted, causing the same error. We use the
    global IO task runner instead.
    
    Bug: b:120096335
    Test: locally build and run. Does not crash during shutdown.
    Change-Id: I80672c99eeab52198158bbb0e6471ccca1dcc21f
    Reviewed-on: https://chromium-review.googlesource.com/c/1354034Reviewed-by: default avatarStefan Kuhne <skuhne@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#612097}
    495c4fed
profile_impl.cc 58.3 KB