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

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

Issue 1440933004: Don't use didStopLoading in failed navigation when other nav in progress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move OnFailedLoadHelper to TestAwContentsClient. Created 5 years 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 void DocumentLoader::mainReceivedError(const ResourceError& error) 213 void DocumentLoader::mainReceivedError(const ResourceError& error)
214 { 214 {
215 ASSERT(!error.isNull()); 215 ASSERT(!error.isNull());
216 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In spectorInstrumentation::isDebuggerPaused(m_frame)); 216 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In spectorInstrumentation::isDebuggerPaused(m_frame));
217 if (m_applicationCacheHost) 217 if (m_applicationCacheHost)
218 m_applicationCacheHost->failedLoadingMainResource(); 218 m_applicationCacheHost->failedLoadingMainResource();
219 if (!frameLoader()) 219 if (!frameLoader())
220 return; 220 return;
221 m_mainDocumentError = error; 221 m_mainDocumentError = error;
222 m_state = MainResourceDone; 222 if (m_state < MainResourceDone)
223 m_state = MainResourceDone;
223 frameLoader()->receivedMainResourceError(this, error); 224 frameLoader()->receivedMainResourceError(this, error);
224 clearMainResourceHandle(); 225 clearMainResourceHandle();
225 } 226 }
226 227
227 // Cancels the data source's pending loads. Conceptually, a data source only lo ads 228 // Cancels the data source's pending loads. Conceptually, a data source only lo ads
228 // one document at a time, but one document may have many related resources. 229 // one document at a time, but one document may have many related resources.
229 // stopLoading will stop all loads initiated by the data source, 230 // stopLoading will stop all loads initiated by the data source,
230 // but not loads initiated by child frames' data sources -- that's the WebFrame' s job. 231 // but not loads initiated by child frames' data sources -- that's the WebFrame' s job.
231 void DocumentLoader::stopLoading() 232 void DocumentLoader::stopLoading()
232 { 233 {
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 { 795 {
795 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 796 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
796 if (!source.isNull()) 797 if (!source.isNull())
797 m_writer->appendReplacingData(source); 798 m_writer->appendReplacingData(source);
798 endWriting(m_writer.get()); 799 endWriting(m_writer.get());
799 } 800 }
800 801
801 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 802 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
802 803
803 } // namespace blink 804 } // namespace blink
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_browsertest.cc ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698