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

Unified Diff: content/browser/frame_host/frame_tree_node.cc

Issue 1039403002: OOPIF: Remove the FrameTreeNode when a RemoteFrame is detached. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add security checks Created 5 years, 9 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/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 7df1291a9f4cb8e0757e34f9e10498bfe865a121..955a08f003b8fb866aac9acaf5485acf6f38892e 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -169,4 +169,14 @@ bool FrameTreeNode::CommitPendingSandboxFlags() {
return did_change_flags;
}
+bool FrameTreeNode::HasAncestorFrom(SiteInstance* site_instance) const {
+ FrameTreeNode* parent_node = parent();
+ while (parent_node) {
+ if (parent_node->current_frame_host()->GetSiteInstance() == site_instance)
+ return true;
+ parent_node = parent_node->parent();
+ }
+ return false;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698