Reset more IPC state on RPHI::ResetIPC()
ResetIPC() is called by both Cleanup() and ProcessDied(), where the latter may be called immediately before the RPHI is reused for a new render process. Some IPC-related cleanup tasks were only being done in Cleanup(). This means it was possible for some tasks scheduled on behalf of the previous process to run after a new process was started by the host. Namely UI-thread interface binding tasks -- limited in lifetime by instance_weak_factory_ WeakPtrs -- could run despite ProcessDied() being invoked after their scheduling. This CL resets instance_weak_factory_ in ResetIPC() rather than only in Cleanup(). It also moves |io_thread_host_| cleanup to ResetIPC() for good measure, since this should prevent some inevitably-cancelled UI thread tasks from being posted on a dead process's behalf. Bug: 1000327 Change-Id: Ib2701e2d99a922c991d57745ad63a6d9b8c294ad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810036Reviewed-by:John Abd-El-Malek <jam@chromium.org> Commit-Queue: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#697536}
Showing
Please register or sign in to comment