| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 } | 224 } |
| 225 | 225 |
| 226 void DocumentLoader::mainReceivedError(const ResourceError& error) | 226 void DocumentLoader::mainReceivedError(const ResourceError& error) |
| 227 { | 227 { |
| 228 ASSERT(!error.isNull()); | 228 ASSERT(!error.isNull()); |
| 229 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In
spectorInstrumentation::isDebuggerPaused(m_frame)); | 229 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In
spectorInstrumentation::isDebuggerPaused(m_frame)); |
| 230 if (m_applicationCacheHost) | 230 if (m_applicationCacheHost) |
| 231 m_applicationCacheHost->failedLoadingMainResource(); | 231 m_applicationCacheHost->failedLoadingMainResource(); |
| 232 if (!frameLoader()) | 232 if (!frameLoader()) |
| 233 return; | 233 return; |
| 234 if (m_state < MainResourceDone) | 234 m_state = MainResourceDone; |
| 235 m_state = MainResourceDone; | |
| 236 frameLoader()->receivedMainResourceError(this, error); | 235 frameLoader()->receivedMainResourceError(this, error); |
| 237 clearMainResourceHandle(); | 236 clearMainResourceHandle(); |
| 238 } | 237 } |
| 239 | 238 |
| 240 // Cancels the data source's pending loads. Conceptually, a data source only lo
ads | 239 // Cancels the data source's pending loads. Conceptually, a data source only lo
ads |
| 241 // one document at a time, but one document may have many related resources. | 240 // one document at a time, but one document may have many related resources. |
| 242 // stopLoading will stop all loads initiated by the data source, | 241 // stopLoading will stop all loads initiated by the data source, |
| 243 // but not loads initiated by child frames' data sources -- that's the WebFrame'
s job. | 242 // but not loads initiated by child frames' data sources -- that's the WebFrame'
s job. |
| 244 void DocumentLoader::stopLoading() | 243 void DocumentLoader::stopLoading() |
| 245 { | 244 { |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 { | 843 { |
| 845 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 844 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 846 if (!source.isNull()) | 845 if (!source.isNull()) |
| 847 m_writer->appendReplacingData(source); | 846 m_writer->appendReplacingData(source); |
| 848 endWriting(m_writer.get()); | 847 endWriting(m_writer.get()); |
| 849 } | 848 } |
| 850 | 849 |
| 851 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 850 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 852 | 851 |
| 853 } // namespace blink | 852 } // namespace blink |
| OLD | NEW |