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

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

Issue 2862293002: Finish removing FrameLoader::Clear() (Closed)
Patch Set: Drop unnecessary #include 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 db77967ab6c8f5ebb6d4107d8bf7a8d0ce5d5860..5d39b98035e414c0021b95372c7c995f48b91150 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -669,7 +669,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;
@@ -1052,6 +1051,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);
Nate Chapin 2017/05/17 18:18:59 This feels like a slightly weird place for this, b
dcheng 2017/05/22 21:23:26 Hmm... I think this is OK.
+ }
+
SecurityOrigin* previous_security_origin = nullptr;
if (frame_->GetDocument())
previous_security_origin = frame_->GetDocument()->GetSecurityOrigin();

Powered by Google App Engine
This is Rietveld 408576698