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

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

Issue 2086083003: Cache RenderFrameHost's parent so it doesn't change over time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index a412041725ad15b4819dd04ed379b7ffc57d1b38..bd779b803a7c8ddb22835e7fdae37f4e342b2fda 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -860,6 +860,12 @@ class CONTENT_EXPORT RenderFrameHostImpl
// The FrameTreeNode which this RenderFrameHostImpl is hosted in.
FrameTreeNode* frame_tree_node_;
+ // The active parent RenderFrameHost for this frame, if it is a subframe.
+ // Null for the main frame. This is cached because the parent FrameTreeNode
+ // may change its current RenderFrameHost while this child is pending
+ // deletion, and GetParent() should never return a different value.
+ RenderFrameHostImpl* parent_;
+
// Track this frame's last committed URL.
GURL last_committed_url_;

Powered by Google App Engine
This is Rietveld 408576698