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

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

Issue 1357763002: DocumentLoader::isCommittedButEmpty is timing-dependent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Guess at fixing CQ faliures Created 5 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/DocumentLoader.h ('k') | Source/web/tests/DocumentLoaderTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // If this is an empty document, it will not have actually been created yet. Commit dummy data so that 287 // If this is an empty document, it will not have actually been created yet. Commit dummy data so that
288 // DocumentWriter::begin() gets called and creates the Document. 288 // DocumentWriter::begin() gets called and creates the Document.
289 if (!m_writer) 289 if (!m_writer)
290 commitData(0, 0); 290 commitData(0, 0);
291 } 291 }
292 292
293 endWriting(m_writer.get()); 293 endWriting(m_writer.get());
294 294
295 if (!m_mainDocumentError.isNull()) 295 if (!m_mainDocumentError.isNull())
296 return; 296 return;
297 m_state = MainResourceDone; 297 m_state = url() == blankURL() || (m_mainResource && !m_mainResource->encoded Size()) ? MainResourceDoneButEmpty : MainResourceDone;
298 298
299 // If the document specified an application cache manifest, it violates the author's intent if we store it in the memory cache 299 // If the document specified an application cache manifest, it violates the author's intent if we store it in the memory cache
300 // and deny the appcache the chance to intercept it in the future, so remove from the memory cache. 300 // and deny the appcache the chance to intercept it in the future, so remove from the memory cache.
301 if (m_frame) { 301 if (m_frame) {
302 if (m_mainResource && m_frame->document()->hasAppCacheManifest()) 302 if (m_mainResource && m_frame->document()->hasAppCacheManifest())
303 memoryCache()->remove(m_mainResource.get()); 303 memoryCache()->remove(m_mainResource.get());
304 } 304 }
305 m_applicationCacheHost->finishedLoadingMainResource(); 305 m_applicationCacheHost->finishedLoadingMainResource();
306 clearMainResourceHandle(); 306 clearMainResourceHandle();
307 } 307 }
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 { 869 {
870 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 870 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
871 if (!source.isNull()) 871 if (!source.isNull())
872 m_writer->appendReplacingData(source); 872 m_writer->appendReplacingData(source);
873 endWriting(m_writer.get()); 873 endWriting(m_writer.get());
874 } 874 }
875 875
876 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 876 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
877 877
878 } // namespace blink 878 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.h ('k') | Source/web/tests/DocumentLoaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698