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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2862293002: Finish removing FrameLoader::Clear() (Closed)
Patch Set: Rebase Created 3 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
Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index a90e72fb90291bb6d1e11b16d19203c69ecfa7de..d477af2b86b2ca5d36466e981412246387db03b3 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -664,7 +664,6 @@ void DocumentLoader::EnsureWriter(const AtomicString& mime_type,
}
DocumentInit init(owner, Url(), frame_);
init.WithNewRegistrationContext();
- frame_->Loader().Clear();
DCHECK(frame_->GetPage());
ParserSynchronizationPolicy parsing_policy = kAllowAsynchronousParsing;
@@ -1047,6 +1046,11 @@ void DocumentLoader::InstallNewDocument(
DCHECK(!frame_->GetDocument() || !frame_->GetDocument()->IsActive());
DCHECK_EQ(frame_->Tree().ChildCount(), 0u);
+ if (GetFrameLoader().StateMachine()->IsDisplayingInitialEmptyDocument()) {
+ GetFrameLoader().StateMachine()->AdvanceTo(
+ FrameLoaderStateMachine::kCommittedFirstRealLoad);
+ }
+
SecurityOrigin* previous_security_origin = nullptr;
if (frame_->GetDocument())
previous_security_origin = frame_->GetDocument()->GetSecurityOrigin();
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698