Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: content/browser/frame_host/render_frame_host_manager.h

Issue 2226023003: Fix RenderView reuse issues after a pending RenderFrameHost dies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from creis@ and nasko@ Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.h
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h
index dd08ac2f96e11a9dcd9a1f16c914f201f70cfb81..30b96e06ff8dcb015cb69081fc67d619794db7c0 100644
--- a/content/browser/frame_host/render_frame_host_manager.h
+++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -508,6 +508,10 @@ class CONTENT_EXPORT RenderFrameHostManager
void ActiveFrameCountIsZero(SiteInstanceImpl* site_instance) override;
void RenderProcessGone(SiteInstanceImpl* site_instance) override;
+ // Cancels and destroys the pending or speculative RenderFrameHost if they
+ // match the provided |render_frame_host|.
+ void CancelPendingIfNecessary(RenderFrameHostImpl* render_frame_host);
+
// Sets up the necessary state for a new RenderViewHost. If |proxy| is not
// null, it creates a RenderFrameProxy in the target renderer process which is
// used to route IPC messages when in swapped out state. Returns early if the
@@ -515,9 +519,6 @@ class CONTENT_EXPORT RenderFrameHostManager
bool InitRenderView(RenderViewHostImpl* render_view_host,
RenderFrameProxyHost* proxy);
- // Terminates and deletes the pending RenderFrameHost.
- void CancelPending();
-
private:
friend class NavigatorTestWithBrowserSideNavigation;
friend class RenderFrameHostManagerTest;
@@ -713,6 +714,9 @@ class CONTENT_EXPORT RenderFrameHostManager
void DiscardUnusedFrame(
std::unique_ptr<RenderFrameHostImpl> render_frame_host);
+ // Terminates and deletes the pending RenderFrameHost.
+ void CancelPending();
+
// Clears pending_render_frame_host_, returning it to the caller for disposal.
std::unique_ptr<RenderFrameHostImpl> UnsetPendingRenderFrameHost();
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698