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

Unified Diff: content/browser/browsing_instance.cc

Issue 257083002: Check BrowsingInstance before swapping prerenders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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
« no previous file with comments | « content/browser/browsing_instance.h ('k') | content/browser/frame_host/render_frame_host_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browsing_instance.cc
diff --git a/content/browser/browsing_instance.cc b/content/browser/browsing_instance.cc
index c70f38b9daaf5b32d64799e439b5b391024a5552..1d5f8953769f92efbc770b3ca88331235d4d8002 100644
--- a/content/browser/browsing_instance.cc
+++ b/content/browser/browsing_instance.cc
@@ -15,7 +15,8 @@
namespace content {
BrowsingInstance::BrowsingInstance(BrowserContext* browser_context)
- : browser_context_(browser_context) {
+ : browser_context_(browser_context),
+ active_contents_count_(0u) {
}
bool BrowsingInstance::HasSiteInstance(const GURL& url) {
@@ -84,6 +85,7 @@ BrowsingInstance::~BrowsingInstance() {
// We should only be deleted when all of the SiteInstances that refer to
// us are gone.
DCHECK(site_instance_map_.empty());
+ DCHECK_EQ(0u, active_contents_count_);
}
} // namespace content
« no previous file with comments | « content/browser/browsing_instance.h ('k') | content/browser/frame_host/render_frame_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698