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

Side by Side Diff: Source/core/loader/DocumentThreadableLoader.h

Issue 891263002: Prevent calling didReceiveData()/didFinishLoading() after didFailAccessControlCheck() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add FIXME. Use RELEASE_ASSERT. Created 5 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 | « no previous file | Source/core/loader/DocumentThreadableLoader.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) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // about origin. Only for handling the initial load (including fallback 97 // about origin. Only for handling the initial load (including fallback
98 // after consulting ServiceWorker). 98 // after consulting ServiceWorker).
99 void dispatchInitialRequest(const ResourceRequest&); 99 void dispatchInitialRequest(const ResourceRequest&);
100 void makeCrossOriginAccessRequest(const ResourceRequest&); 100 void makeCrossOriginAccessRequest(const ResourceRequest&);
101 // Loads m_fallbackRequestForServiceWorker. 101 // Loads m_fallbackRequestForServiceWorker.
102 void loadFallbackRequestForServiceWorker(); 102 void loadFallbackRequestForServiceWorker();
103 // Loads m_actualRequest. 103 // Loads m_actualRequest.
104 void loadActualRequest(); 104 void loadActualRequest();
105 // Clears m_actualRequest and reports access control check failure to 105 // Clears m_actualRequest and reports access control check failure to
106 // m_client. 106 // m_client.
107 void handlePreflightFailure(const String& url, const String& errorDescri ption); 107 // Call handleAccessControlCheckFailure() instead of
108 // m_client->didFailAccessControlCheck() from other places in
tyoshino (SeeGerritForStatus) 2015/02/03 13:06:36 what does "other" here mean?
hiroshige 2015/02/03 13:11:39 I meant "anywhere outside handleAccessControlCheck
109 // DocumentThreadableLoader.
110 void handleAccessControlCheckFailure(const String& url, const String& er rorDescription);
108 // Investigates the response for the preflight request. If successful, 111 // Investigates the response for the preflight request. If successful,
109 // the actual request will be made later in handleSuccessfulFinish(). 112 // the actual request will be made later in handleSuccessfulFinish().
110 void handlePreflightResponse(const ResourceResponse&); 113 void handlePreflightResponse(const ResourceResponse&);
111 114
112 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); 115 void loadRequest(const ResourceRequest&, ResourceLoaderOptions);
113 bool isAllowedRedirect(const KURL&) const; 116 bool isAllowedRedirect(const KURL&) const;
114 bool isAllowedByContentSecurityPolicy(const KURL&) const; 117 bool isAllowedByContentSecurityPolicy(const KURL&) const;
115 // Returns DoNotAllowStoredCredentials 118 // Returns DoNotAllowStoredCredentials
116 // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just 119 // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just
117 // returns allowCredentials value of m_resourceLoaderOptions. 120 // returns allowCredentials value of m_resourceLoaderOptions.
(...skipping 29 matching lines...) Expand all
147 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect. 150 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect.
148 Timer<DocumentThreadableLoader> m_timeoutTimer; 151 Timer<DocumentThreadableLoader> m_timeoutTimer;
149 double m_requestStartedSeconds; // Time an asynchronous fetch request is started 152 double m_requestStartedSeconds; // Time an asynchronous fetch request is started
150 153
151 // Max number of times that this DocumentThreadableLoader can follow 154 // Max number of times that this DocumentThreadableLoader can follow
152 // cross-origin redirects. 155 // cross-origin redirects.
153 // This is used to limit the number of redirects. 156 // This is used to limit the number of redirects.
154 // But this value is not the max number of total redirects allowed, 157 // But this value is not the max number of total redirects allowed,
155 // because same-origin redirects are not counted here. 158 // because same-origin redirects are not counted here.
156 int m_corsRedirectLimit; 159 int m_corsRedirectLimit;
160
161 bool m_accessControlCheckFailed;
157 }; 162 };
158 163
159 } // namespace blink 164 } // namespace blink
160 165
161 #endif // DocumentThreadableLoader_h 166 #endif // DocumentThreadableLoader_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698