OLD | NEW |
---|---|
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 | 174 |
175 // FIXME: It's unfortunate that the cache layer and below get to know anythi ng about fragment identifiers. | 175 // FIXME: It's unfortunate that the cache layer and below get to know anythi ng about fragment identifiers. |
176 // We should look into removing the expectation of that knowledge from the p latform network stacks. | 176 // We should look into removing the expectation of that knowledge from the p latform network stacks. |
177 ResourceRequest request(m_resourceRequest); | 177 ResourceRequest request(m_resourceRequest); |
178 if (!m_fragmentIdentifierForRequest.isNull()) { | 178 if (!m_fragmentIdentifierForRequest.isNull()) { |
179 KURL url = request.url(); | 179 KURL url = request.url(); |
180 url.setFragmentIdentifier(m_fragmentIdentifierForRequest); | 180 url.setFragmentIdentifier(m_fragmentIdentifierForRequest); |
181 request.setURL(url); | 181 request.setURL(url); |
182 m_fragmentIdentifierForRequest = String(); | 182 m_fragmentIdentifierForRequest = String(); |
183 } | 183 } |
184 | 184 m_status = Pending; |
Nate Chapin
2013/09/12 23:28:46
Set pending before rather than after, so it doesn'
| |
185 m_loader = ResourceLoader::create(fetcher, this, request, options); | 185 m_loader = ResourceLoader::create(fetcher, this, request, options); |
186 if (!m_loader) { | 186 m_loader->start(); |
Nate Chapin
2013/09/12 23:28:46
This if() was already dead code, ResourceLoader do
| |
187 failBeforeStarting(); | |
188 return; | |
189 } | |
190 m_status = Pending; | |
191 } | 187 } |
192 | 188 |
193 void Resource::checkNotify() | 189 void Resource::checkNotify() |
194 { | 190 { |
195 if (isLoading()) | 191 if (isLoading()) |
196 return; | 192 return; |
197 | 193 |
198 ResourceClientWalker<ResourceClient> w(m_clients); | 194 ResourceClientWalker<ResourceClient> w(m_clients); |
199 while (ResourceClient* c = w.next()) | 195 while (ResourceClient* c = w.next()) |
200 c->notifyFinished(this); | 196 c->notifyFinished(this); |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
872 Vector<ResourcePtr<Resource> > resources; | 868 Vector<ResourcePtr<Resource> > resources; |
873 for (HashSet<Resource*>::iterator it = m_resourcesWithPendingClients.begin() ; it != end; ++it) | 869 for (HashSet<Resource*>::iterator it = m_resourcesWithPendingClients.begin() ; it != end; ++it) |
874 resources.append(*it); | 870 resources.append(*it); |
875 m_resourcesWithPendingClients.clear(); | 871 m_resourcesWithPendingClients.clear(); |
876 for (size_t i = 0; i < resources.size(); i++) | 872 for (size_t i = 0; i < resources.size(); i++) |
877 resources[i]->finishPendingClients(); | 873 resources[i]->finishPendingClients(); |
878 } | 874 } |
879 | 875 |
880 } | 876 } |
881 | 877 |
OLD | NEW |