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

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

Issue 2546533007: Store the last committed origin in RenderFrameHostImpl. (Closed)
Patch Set: Rebase (and remove DCHECK) Created 4 years 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.h
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index 6ee699e87346b7059c202012dbc7136aaed37b77..701787120d6ce6863e0ea4672ceeeb46e037e361 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -138,6 +138,10 @@ class CONTENT_EXPORT FrameTreeNode {
}
// Returns the origin of the last committed page in this frame.
+ // WARNING: To get the last committed origin for a particular
+ // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead,
+ // which will behave correctly even when the RenderFrameHost is not the
+ // current one for this frame (such as when it's pending deletion).
alexmos 2016/12/06 17:22:40 I'm not thrilled about storing the origin in two p
Charlie Reis 2016/12/08 19:51:47 Yeah, I see the dilemma. I'm ok with this at leas
const url::Origin& current_origin() const {
return replication_state_.origin;
alexmos 2016/12/06 17:22:40 I tried putting a DCHECK here to see if any caller
Charlie Reis 2016/12/08 19:51:47 I agree that IsURLInPageNavigation needs to get th
}

Powered by Google App Engine
This is Rietveld 408576698