Use SupportsWeakPtr for messaging from rendering thread to main thread
In cross-thread messaging, the associated execution context can be already gone when a posted task is performed sometime later in the task runner's queue. By using WeakPtr, the task runner will not perform a scheduled task in the queue when the target object is invalid. Bug: 1057735 Change-Id: I3f218ad073ff5f6dcb08aba176d722c5c729316b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2086051Reviewed-by:Raymond Toy <rtoy@chromium.org> Commit-Queue: Hongchan Choi <hongchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#747043}
Showing
Please register or sign in to comment