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

Side by Side Diff: Source/core/fetch/Resource.cpp

Issue 268743003: [XHR] Delete an incorrect ASSERT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 | « LayoutTests/http/tests/xmlhttprequest/duplicate-revalidation-reload-expected.txt ('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 rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 continue; 724 continue;
725 m_response.setHTTPHeaderField(it->key, it->value); 725 m_response.setHTTPHeaderField(it->key, it->value);
726 } 726 }
727 } 727 }
728 728
729 void Resource::revalidationSucceeded(const ResourceResponse& response) 729 void Resource::revalidationSucceeded(const ResourceResponse& response)
730 { 730 {
731 ASSERT(m_resourceToRevalidate); 731 ASSERT(m_resourceToRevalidate);
732 ASSERT(!memoryCache()->contains(m_resourceToRevalidate)); 732 ASSERT(!memoryCache()->contains(m_resourceToRevalidate));
733 ASSERT(m_resourceToRevalidate->isLoaded()); 733 ASSERT(m_resourceToRevalidate->isLoaded());
734 ASSERT(memoryCache()->contains(this));
735 734
736 // Calling evict() can potentially delete revalidatingResource, which we use 735 // Calling evict() can potentially delete revalidatingResource, which we use
737 // below. This mustn't be the case since revalidation means it is loaded 736 // below. This mustn't be the case since revalidation means it is loaded
738 // and so canDelete() is false. 737 // and so canDelete() is false.
739 ASSERT(!canDelete()); 738 ASSERT(!canDelete());
740 739
741 m_resourceToRevalidate->updateResponseAfterRevalidation(response); 740 m_resourceToRevalidate->updateResponseAfterRevalidation(response);
742 memoryCache()->replace(m_resourceToRevalidate, this); 741 memoryCache()->replace(m_resourceToRevalidate, this);
743 742
744 switchClientsToRevalidatedResource(); 743 switchClientsToRevalidatedResource();
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 return "ImportResource"; 993 return "ImportResource";
995 case Resource::Media: 994 case Resource::Media:
996 return "Media"; 995 return "Media";
997 } 996 }
998 ASSERT_NOT_REACHED(); 997 ASSERT_NOT_REACHED();
999 return "Unknown"; 998 return "Unknown";
1000 } 999 }
1001 #endif // !LOG_DISABLED 1000 #endif // !LOG_DISABLED
1002 1001
1003 } 1002 }
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/duplicate-revalidation-reload-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698