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

Side by Side Diff: Source/WebCore/loader/MainResourceLoader.cpp

Issue 12090050: Revert 138962 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1397/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « Source/WebCore/loader/FrameLoader.cpp ('k') | Source/WebCore/platform/network/ResourceHandle.h » ('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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 541
542 documentLoader()->timing()->setResponseEnd(finishTime ? finishTime : (m_time OfLastDataReceived ? m_timeOfLastDataReceived : monotonicallyIncreasingTime())); 542 documentLoader()->timing()->setResponseEnd(finishTime ? finishTime : (m_time OfLastDataReceived ? m_timeOfLastDataReceived : monotonicallyIncreasingTime()));
543 documentLoader()->finishedLoading(); 543 documentLoader()->finishedLoading();
544 544
545 dl->applicationCacheHost()->finishedLoadingMainResource(); 545 dl->applicationCacheHost()->finishedLoadingMainResource();
546 } 546 }
547 547
548 void MainResourceLoader::notifyFinished(CachedResource* resource) 548 void MainResourceLoader::notifyFinished(CachedResource* resource)
549 { 549 {
550 ASSERT_UNUSED(resource, m_resource == resource); 550 ASSERT_UNUSED(resource, m_resource == resource);
551 ASSERT(m_resource); 551 if (!m_resource || (!m_resource->errorOccurred() && !m_resource->wasCanceled ())) {
552 if (!m_resource->errorOccurred() && !m_resource->wasCanceled()) {
553 didFinishLoading(m_resource->loadFinishTime()); 552 didFinishLoading(m_resource->loadFinishTime());
554 return; 553 return;
555 } 554 }
556 555
557 if (m_documentLoader->request().cachePolicy() == ReturnCacheDataDontLoad && !m_resource->wasCanceled()) {
558 frameLoader()->retryAfterFailedCacheOnlyMainResourceLoad();
559 return;
560 }
561
562 const ResourceError& error = m_resource->resourceError(); 556 const ResourceError& error = m_resource->resourceError();
563 if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForMainError( request(), error)) 557 if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForMainError( request(), error))
564 return; 558 return;
565 559
566 // There is a bug in CFNetwork where callbacks can be dispatched even when l oads are deferred. 560 // There is a bug in CFNetwork where callbacks can be dispatched even when l oads are deferred.
567 // See <rdar://problem/6304600> for more details. 561 // See <rdar://problem/6304600> for more details.
568 #if !USE(CF) 562 #if !USE(CF)
569 ASSERT(!defersLoading()); 563 ASSERT(!defersLoading());
570 #endif 564 #endif
571 565
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 { 689 {
696 ASSERT(!m_substituteDataLoadIdentifier || !loader() || !loader()->identifier ()); 690 ASSERT(!m_substituteDataLoadIdentifier || !loader() || !loader()->identifier ());
697 if (m_substituteDataLoadIdentifier) 691 if (m_substituteDataLoadIdentifier)
698 return m_substituteDataLoadIdentifier; 692 return m_substituteDataLoadIdentifier;
699 if (ResourceLoader* resourceLoader = loader()) 693 if (ResourceLoader* resourceLoader = loader())
700 return resourceLoader->identifier(); 694 return resourceLoader->identifier();
701 return 0; 695 return 0;
702 } 696 }
703 697
704 } 698 }
OLDNEW
« no previous file with comments | « Source/WebCore/loader/FrameLoader.cpp ('k') | Source/WebCore/platform/network/ResourceHandle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698