| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 ASSERT_UNUSED(resource, m_mainResource == resource); | 275 ASSERT_UNUSED(resource, m_mainResource == resource); |
| 276 ASSERT(m_mainResource); | 276 ASSERT(m_mainResource); |
| 277 | 277 |
| 278 if (!m_mainResource->errorOccurred() && !m_mainResource->wasCanceled()) { | 278 if (!m_mainResource->errorOccurred() && !m_mainResource->wasCanceled()) { |
| 279 finishedLoading(m_mainResource->loadFinishTime()); | 279 finishedLoading(m_mainResource->loadFinishTime()); |
| 280 return; | 280 return; |
| 281 } | 281 } |
| 282 | 282 |
| 283 if (m_applicationCacheHost) | 283 if (m_applicationCacheHost) |
| 284 m_applicationCacheHost->failedLoadingMainResource(); | 284 m_applicationCacheHost->failedLoadingMainResource(); |
| 285 if (m_writer) |
| 286 endWriting(m_writer.get()); |
| 285 m_state = MainResourceDone; | 287 m_state = MainResourceDone; |
| 286 frameLoader()->loadFailed(this, m_mainResource->resourceError()); | 288 frameLoader()->loadFailed(this, m_mainResource->resourceError()); |
| 287 clearMainResourceHandle(); | 289 clearMainResourceHandle(); |
| 288 } | 290 } |
| 289 | 291 |
| 290 void DocumentLoader::finishedLoading(double finishTime) | 292 void DocumentLoader::finishedLoading(double finishTime) |
| 291 { | 293 { |
| 292 DCHECK(m_frame->loader().stateMachine()->creatingInitialEmptyDocument() | 294 DCHECK(m_frame->loader().stateMachine()->creatingInitialEmptyDocument() |
| 293 || !m_frame->page()->defersLoading() | 295 || !m_frame->page()->defersLoading() |
| 294 || InspectorInstrumentation::isDebuggerPaused(m_frame)); | 296 || InspectorInstrumentation::isDebuggerPaused(m_frame)); |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 { | 733 { |
| 732 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); | 734 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); |
| 733 if (!source.isNull()) | 735 if (!source.isNull()) |
| 734 m_writer->appendReplacingData(source); | 736 m_writer->appendReplacingData(source); |
| 735 endWriting(m_writer.get()); | 737 endWriting(m_writer.get()); |
| 736 } | 738 } |
| 737 | 739 |
| 738 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 740 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 739 | 741 |
| 740 } // namespace blink | 742 } // namespace blink |
| OLD | NEW |