Evict all OOPIFs when the top-level renderer gets evicted.
Adding site isolation label since this might help with OOMs for site isolation on Android.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e61e5c039ad078794cb30566b7252f6ce8a85042 commit e61e5c039ad078794cb30566b7252f6ce8a85042 Author: Saman Sami <samans@chromium.org> Date: Mon Nov 05 22:11:44 2018 Implement frame eviction for OOPIFs Frame eviction is intended to allow only a handful of tabs to keep their tiles alive while in background. Before site isolation, there used to be only one surface per tab that needed to be evicted, but now cross-site iframes have their own surfaces too, so if we want to avoid linear growth in tile memory as the number of tabs increases, these surfaces must be evicted too. Make DelegatedFrameHost grab all SurfaceIds in the frame tree on eviction and evict them all, as opposed to only evicting the surface of the top-level renderer. The next time the tab is visible, notify all evicted RenderWidgets so that they can allocate new SurfaceIds for their children. Bug: 893793 Change-Id: I3dfbba961a6ae696d4207f7c0728a195fe8275a4 Reviewed-on: https://chromium-review.googlesource.com/c/1307252 Commit-Queue: Saman Sami <samans@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Fady Samuel <fsamuel@chromium.org> Cr-Commit-Position: refs/heads/master@{#605489} [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/components/viz/service/frame_sinks/compositor_frame_sink_support.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/components/viz/service/frame_sinks/surface_synchronization_unittest.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/browser_compositor_view_mac.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/browser_compositor_view_mac.mm [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/delegated_frame_host.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/delegated_frame_host.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/delegated_frame_host_client_aura.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/delegated_frame_host_client_aura.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_view_host_impl.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_view_host_impl.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_impl.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_impl.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_aura.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_aura.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_base.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_child_frame.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_child_frame.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_mac.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_mac.mm [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/common/widget_messages.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/renderer/render_frame_impl_browsertest.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/renderer/render_frame_proxy.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/renderer/render_frame_proxy.h [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/renderer/render_widget.cc [modify] https://crrev.com/e61e5c039ad078794cb30566b7252f6ce8a85042/content/renderer/render_widget.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b26d9112989d6cb2a786b2ae67abf4ec8be157cd commit b26d9112989d6cb2a786b2ae67abf4ec8be157cd Author: Saman Sami <samans@chromium.org> Date: Wed Nov 07 21:52:28 2018 Drop temporary references on eviction There is no reason to keep the surface alive if it's explicitly evicted. Bug: 893793 Change-Id: I95b77abb386345368dbb8a295b695543aa94a749 Reviewed-on: https://chromium-review.googlesource.com/c/1321259 Commit-Queue: Saman Sami <samans@chromium.org> Reviewed-by: Fady Samuel <fsamuel@chromium.org> Cr-Commit-Position: refs/heads/master@{#606176} [modify] https://crrev.com/b26d9112989d6cb2a786b2ae67abf4ec8be157cd/components/viz/service/frame_sinks/compositor_frame_sink_support.cc [modify] https://crrev.com/b26d9112989d6cb2a786b2ae67abf4ec8be157cd/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc [modify] https://crrev.com/b26d9112989d6cb2a786b2ae67abf4ec8be157cd/components/viz/service/frame_sinks/surface_references_unittest.cc [modify] https://crrev.com/b26d9112989d6cb2a786b2ae67abf4ec8be157cd/components/viz/service/surfaces/surface_manager.cc [modify] https://crrev.com/b26d9112989d6cb2a786b2ae67abf4ec8be157cd/components/viz/service/surfaces/surface_manager.h
Comment 1 by alex...@chromium.org
, Nov 2