Commit 4c55adba authored by Camille Lamy's avatar Camille Lamy Committed by Commit Bot

Pass DocumentLoader to FrameLoader::CommitDocumentLoader

This CL allows FrameLoader::CommitDocumentLoader to commit a specified
DocumentLoader instead of the provisional DocumentLoader. This is part
of a series of CLs that aim at removing the provisional loader (step 8k
in the linked doc in the bug).

Bug: 855189
Change-Id: Ic59f1793c1db01d4a6f05546a67ce42ec5f70cd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611818
Commit-Queue: Camille Lamy <clamy@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676871}
parent c50b012b
......@@ -210,7 +210,7 @@ void FrameLoader::Init() {
if (!PrepareForCommit())
return;
CommitDocumentLoader();
CommitDocumentLoader(provisional_document_loader_.Release());
// Load the document if needed.
document_loader_->StartLoadingResponse();
......@@ -934,10 +934,11 @@ void FrameLoader::CommitNavigation(
provisional_document_loader_->StartLoading();
WillCommitNavigation();
if (!PrepareForCommit())
return;
CommitDocumentLoader();
CommitDocumentLoader(provisional_document_loader_.Release());
// Load the document if needed.
document_loader_->StartLoadingResponse();
......@@ -1068,8 +1069,8 @@ void FrameLoader::WillCommitNavigation() {
virtual_time_pauser_.UnpauseVirtualTime();
}
void FrameLoader::CommitDocumentLoader() {
document_loader_ = provisional_document_loader_.Release();
void FrameLoader::CommitDocumentLoader(DocumentLoader* document_loader) {
document_loader_ = document_loader;
CHECK(document_loader_);
document_loader_->MarkAsCommitted();
......
......@@ -246,8 +246,8 @@ class CORE_EXPORT FrameLoader final {
void WillCommitNavigation();
// Commits the provisional DocumentLoader.
void CommitDocumentLoader();
// Commits the given |document_loader|.
void CommitDocumentLoader(DocumentLoader* document_loader);
LocalFrameClient* Client() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment