Add a Prefinalizer to CanvasFontCache and move the current destructor content to the Prefinalizer.
This is necessary to resolve a use-after-free issue: the CanvasFontCache is promptly freed on heap tear down but not unregistered from TaskObserver. Change-Id: I0a048bfd8dcae79d57a882ec553eb4aa9877a77a Reviewed-on: https://chromium-review.googlesource.com/893140Reviewed-by:Kentaro Hara <haraken@chromium.org> Commit-Queue: Hannes Payer <hpayer@chromium.org> Cr-Commit-Position: refs/heads/master@{#532873}
Showing
Please register or sign in to comment