Bug 1445659 - Make BrowsingContext interact with bfcache. r=peterv

Have BrowsingContext keep its own cache to enable caching of
BrowsingContexts, especially in the parent process.

This isn't really optimal, since it effectively duplicates the
cache in the child process. BFcache keeps a list of strong pointers to
the list of cached nsDocShells, where each nsDocShell in turn keeps a
reciprocated strong pointer to its BrowsingContext, which in turn is
held in the BrowsingContexts list of cached contexts. Ideally these
caches should be merged.
This commit is contained in:
Andreas Farre
2018-06-28 05:40:00 +03:00
parent b2b698695f
commit b80facf293
6 changed files with 79 additions and 8 deletions

View File

@@ -7763,6 +7763,8 @@ nsDocShell::CaptureState()
mOSHE->AddChildShell(childShell);
}
mBrowsingContext->CacheChildren();
return NS_OK;
}