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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/Resource.cpp

Issue 2706303002: Check whether ScriptResource is still loading due to revalidation (Closed)
Patch Set: Rebase Created 3 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 | « third_party/WebKit/Source/platform/loader/fetch/Resource.h ('k') | no next file » | 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
7 rights reserved. 7 rights reserved.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 if (!m_redirectChain.size()) 561 if (!m_redirectChain.size())
562 return resourceRequest(); 562 return resourceRequest();
563 return m_redirectChain.back().m_request; 563 return m_redirectChain.back().m_request;
564 } 564 }
565 565
566 void Resource::setRevalidatingRequest(const ResourceRequest& request) { 566 void Resource::setRevalidatingRequest(const ResourceRequest& request) {
567 SECURITY_CHECK(m_redirectChain.isEmpty()); 567 SECURITY_CHECK(m_redirectChain.isEmpty());
568 DCHECK(!request.isNull()); 568 DCHECK(!request.isNull());
569 CHECK(!m_isRevalidationStartForbidden); 569 CHECK(!m_isRevalidationStartForbidden);
570 m_isRevalidating = true; 570 m_isRevalidating = true;
571 m_hasRevalidated = true;
571 m_resourceRequest = request; 572 m_resourceRequest = request;
572 m_status = ResourceStatus::NotStarted; 573 m_status = ResourceStatus::NotStarted;
573 } 574 }
574 575
575 bool Resource::willFollowRedirect(const ResourceRequest& newRequest, 576 bool Resource::willFollowRedirect(const ResourceRequest& newRequest,
576 const ResourceResponse& redirectResponse) { 577 const ResourceResponse& redirectResponse) {
577 if (m_isRevalidating) 578 if (m_isRevalidating)
578 revalidationFailed(); 579 revalidationFailed();
579 m_redirectChain.push_back(RedirectPair(newRequest, redirectResponse)); 580 m_redirectChain.push_back(RedirectPair(newRequest, redirectResponse));
580 return true; 581 return true;
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 case Resource::Media: 1123 case Resource::Media:
1123 case Resource::Manifest: 1124 case Resource::Manifest:
1124 case Resource::Mock: 1125 case Resource::Mock:
1125 return false; 1126 return false;
1126 } 1127 }
1127 NOTREACHED(); 1128 NOTREACHED();
1128 return false; 1129 return false;
1129 } 1130 }
1130 1131
1131 } // namespace blink 1132 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/Resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698