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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2809733003: Move most of FrameLoader::CheckCompleted() to Document (Closed)
Patch Set: processingLoadEvent() as part of shouldComplete(), cleanup shouldComplete() Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 history_commit_type); 423 history_commit_type);
424 if (!frame_) 424 if (!frame_)
425 return; 425 return;
426 loader.DetachProvisionalDocumentLoader(this); 426 loader.DetachProvisionalDocumentLoader(this);
427 } else if (state_ == kCommitted) { 427 } else if (state_ == kCommitted) {
428 if (frame_->GetDocument()->Parser()) 428 if (frame_->GetDocument()->Parser())
429 frame_->GetDocument()->Parser()->StopParsing(); 429 frame_->GetDocument()->Parser()->StopParsing();
430 state_ = kSentDidFinishLoad; 430 state_ = kSentDidFinishLoad;
431 GetLocalFrameClient().DispatchDidFailLoad(error, history_commit_type); 431 GetLocalFrameClient().DispatchDidFailLoad(error, history_commit_type);
432 } 432 }
433 loader.CheckCompleted(); 433 DCHECK_EQ(kSentDidFinishLoad, state_);
434 loader.DidFinishNavigation();
yhirano 2017/04/14 10:33:35 Can you tell me why FrameLoader::DidFinishNavigati
Nate Chapin 2017/04/18 21:56:38 Because all the tests pass? :D For provisional na
434 } 435 }
435 436
436 void DocumentLoader::FinishedLoading(double finish_time) { 437 void DocumentLoader::FinishedLoading(double finish_time) {
437 DCHECK(frame_->Loader().StateMachine()->CreatingInitialEmptyDocument() || 438 DCHECK(frame_->Loader().StateMachine()->CreatingInitialEmptyDocument() ||
438 !frame_->GetPage()->Suspended() || 439 !frame_->GetPage()->Suspended() ||
439 MainThreadDebugger::Instance()->IsPaused()); 440 MainThreadDebugger::Instance()->IsPaused());
440 441
441 double response_end_time = finish_time; 442 double response_end_time = finish_time;
442 if (!response_end_time) 443 if (!response_end_time)
443 response_end_time = time_of_last_data_received_; 444 response_end_time = time_of_last_data_received_;
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 InstallNewDocumentReason::kJavascriptURL, 1115 InstallNewDocumentReason::kJavascriptURL,
1115 kForceSynchronousParsing, KURL()); 1116 kForceSynchronousParsing, KURL());
1116 if (!source.IsNull()) 1117 if (!source.IsNull())
1117 writer_->AppendReplacingData(source); 1118 writer_->AppendReplacingData(source);
1118 EndWriting(); 1119 EndWriting();
1119 } 1120 }
1120 1121
1121 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 1122 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
1122 1123
1123 } // namespace blink 1124 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698