-
liberato@chromium.org authored
Previously, we would use one weak pointer for the media WebContentsObserver for all power experiment callbacks. However, since the experiment manager posts callbacks, it's possible that a callback will run after its RenderFrameHost is deleted. Since we use the RenderFrameHost to notify the renderer, this would be a problem in that case. This CL adds per-frame weak pointers that are invalidated after the frame is destroyed, so that any pending callbacks don't run. Change-Id: I02835ebfd620816e385fd215472dd78ecbeae4fa Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1897701Reviewed-by:
Chrome Cunningham <chcunningham@chromium.org> Commit-Queue: Frank Liberato <liberato@chromium.org> Cr-Commit-Position: refs/heads/master@{#712651}
65955dcb