• Yutaka Hirano's avatar
    Make ThreadableLoaderClient GarbageCollectedMixin · 89797ba0
    Yutaka Hirano authored
    ThreadableLoaderClient has not been GarbageCollected mainly for
    WorkerThreadableLoader. Now WorkerThreadableLoader is gone, so we can
    make it an on-heap class. Doing so brings several benefits:
    
     - This is a blocker of removing ThreadableLoader after OOR-CORS is
       enabled, as ResourceClient is a GarbageCollectedMixin.
     - As ThreadableLoader holds a reference to its client as a raw
       pointer, each user needs to guarantee to cancel the loader properly
       before the client gets invalid. As most of clietns are already
       on-heap, this requires pre-finalizer for each client. Also, failing
       to keep the contract leads to crashes which are very hard to
       investigate.
    
    Bug: 900506
    Change-Id: I67b3e3dab7e0600f06da5222d458ff2d81c36c7b
    Reviewed-on: https://chromium-review.googlesource.com/c/1335056Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
    Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#607970}
    89797ba0
event_source.cc 12.8 KB