Make ThreadableLoaderClient GarbageCollectedMixin
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:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Takashi Toyoshima <toyoshim@chromium.org> Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#607970}
Showing
Please register or sign in to comment