Chromium Code Reviews| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 | 268 |
| 269 if (m_applicationCacheHost) | 269 if (m_applicationCacheHost) |
| 270 m_applicationCacheHost->failedLoadingMainResource(); | 270 m_applicationCacheHost->failedLoadingMainResource(); |
| 271 m_state = MainResourceDone; | 271 m_state = MainResourceDone; |
| 272 frameLoader()->loadFailed(this, m_mainResource->resourceError()); | 272 frameLoader()->loadFailed(this, m_mainResource->resourceError()); |
| 273 clearMainResourceHandle(); | 273 clearMainResourceHandle(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void DocumentLoader::finishedLoading(double finishTime) | 276 void DocumentLoader::finishedLoading(double finishTime) |
| 277 { | 277 { |
| 278 ASSERT(!m_frame->page()->defersLoading() || InspectorInstrumentation::isDebu ggerPaused(m_frame)); | 278 DCHECK(m_frame->loader().stateMachine()->creatingInitialEmptyDocument() |
|
dcheng
2016/07/25 06:48:18
This is called during FrameLoader::init() to creat
| |
| 279 || !m_frame->page()->defersLoading() | |
| 280 || InspectorInstrumentation::isDebuggerPaused(m_frame)); | |
| 279 | 281 |
| 280 double responseEndTime = finishTime; | 282 double responseEndTime = finishTime; |
| 281 if (!responseEndTime) | 283 if (!responseEndTime) |
| 282 responseEndTime = m_timeOfLastDataReceived; | 284 responseEndTime = m_timeOfLastDataReceived; |
| 283 if (!responseEndTime) | 285 if (!responseEndTime) |
| 284 responseEndTime = monotonicallyIncreasingTime(); | 286 responseEndTime = monotonicallyIncreasingTime(); |
| 285 timing().setResponseEnd(responseEndTime); | 287 timing().setResponseEnd(responseEndTime); |
| 286 | 288 |
| 287 commitIfReady(); | 289 commitIfReady(); |
| 288 if (!frameLoader()) | 290 if (!frameLoader()) |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 710 { | 712 { |
| 711 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); | 713 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 712 if (!source.isNull()) | 714 if (!source.isNull()) |
| 713 m_writer->appendReplacingData(source); | 715 m_writer->appendReplacingData(source); |
| 714 endWriting(m_writer.get()); | 716 endWriting(m_writer.get()); |
| 715 } | 717 } |
| 716 | 718 |
| 717 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 719 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 718 | 720 |
| 719 } // namespace blink | 721 } // namespace blink |
| OLD | NEW |