| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |