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

Unified Diff: content/test/web_contents_observer_sanity_checker.cc

Issue 1495993002: Enforce all subframes to be in the same BrowsingInstance as the parent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UMA test. Created 5 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/test/web_contents_observer_sanity_checker.cc
diff --git a/content/test/web_contents_observer_sanity_checker.cc b/content/test/web_contents_observer_sanity_checker.cc
index a27c96b3ac16ba636529829552bea3589e59eec2..75134a5e3d7c832d81eb7737674ae959fc42ecaf 100644
--- a/content/test/web_contents_observer_sanity_checker.cc
+++ b/content/test/web_contents_observer_sanity_checker.cc
@@ -54,6 +54,12 @@ void WebContentsObserverSanityChecker::RenderFrameCreated(
static_cast<RenderFrameHostImpl*>(render_frame_host)->IsRenderFrameLive())
<< "RenderFrameCreated called on for a RenderFrameHost that thinks it is "
"not alive.";
+
+ // Any child frame must be in the same BrowsingInstace as its parent.
Charlie Reis 2015/12/04 18:23:23 nit: BrowsingInstance
nasko 2015/12/04 18:32:33 Done.
+ if (render_frame_host->GetParent()) {
+ CHECK(render_frame_host->GetSiteInstance()->IsRelatedSiteInstance(
+ render_frame_host->GetParent()->GetSiteInstance()));
+ }
}
void WebContentsObserverSanityChecker::RenderFrameDeleted(

Powered by Google App Engine
This is Rietveld 408576698