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

Side by Side Diff: third_party/WebKit/Source/core/loader/ThreadableLoader.h

Issue 2146403004: ThreadableLoader::cancel should be called before loader destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-threadable-loader-client-wrapper
Patch Set: fix Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // async failures separately 145 // async failures separately
146 // 146 //
147 // Loading completes when one of the following methods are called: 147 // Loading completes when one of the following methods are called:
148 // - didFinishLoading() 148 // - didFinishLoading()
149 // - didFail() 149 // - didFail()
150 // - didFailAccessControlCheck() 150 // - didFailAccessControlCheck()
151 // - didFailRedirectCheck() 151 // - didFailRedirectCheck()
152 // After any of these methods is called, the loader won't call any of the 152 // After any of these methods is called, the loader won't call any of the
153 // ThreadableLoaderClient methods. 153 // ThreadableLoaderClient methods.
154 // 154 //
155 // When a ThreadableLoader is destructed, any of the 155 // A user must guarantee that the loading completes before the attached
156 // ThreadableLoaderClient methods is NOT called in response to the 156 // client gets invalid. Also, a user must guarantee that the loading
157 // destruction either synchronously or after destruction. 157 // completes before the ThreadableLoader is destructed.
158 // 158 //
159 // When ThreadableLoader::cancel() is called, 159 // When ThreadableLoader::cancel() is called,
160 // ThreadableLoaderClient::didFail() is called with a ResourceError 160 // ThreadableLoaderClient::didFail() is called with a ResourceError
161 // with isCancellation() returning true, if any of didFinishLoading() 161 // with isCancellation() returning true, if any of didFinishLoading()
162 // or didFail.*() methods have not been called yet. (didFail() may be 162 // or didFail.*() methods have not been called yet. (didFail() may be
163 // called with a ResourceError with isCancellation() returning true 163 // called with a ResourceError with isCancellation() returning true
164 // also for cancellation happened inside the loader.) 164 // also for cancellation happened inside the loader.)
165 // 165 //
166 // ThreadableLoaderClient methods: 166 // ThreadableLoaderClient methods:
167 // - may call cancel() 167 // - may call cancel()
(...skipping 16 matching lines...) Expand all
184 184
185 virtual ~ThreadableLoader() { } 185 virtual ~ThreadableLoader() { }
186 186
187 protected: 187 protected:
188 ThreadableLoader() { } 188 ThreadableLoader() { }
189 }; 189 };
190 190
191 } // namespace blink 191 } // namespace blink
192 192
193 #endif // ThreadableLoader_h 193 #endif // ThreadableLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698