Index: Source/core/loader/DocumentThreadableLoader.h |
diff --git a/Source/core/loader/DocumentThreadableLoader.h b/Source/core/loader/DocumentThreadableLoader.h |
index 5e768dbe5693f4f60aa52d3bae9e232d78752da3..620e89a1deec9f6bca61efb65d3110f8884e093e 100644 |
--- a/Source/core/loader/DocumentThreadableLoader.h |
+++ b/Source/core/loader/DocumentThreadableLoader.h |
@@ -62,6 +62,7 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv |
void overrideTimeout(unsigned long timeout) override; |
+ // |this| may be dead after calling this method in async mode. |
void cancel() override; |
void setDefersLoading(bool); |
@@ -73,9 +74,16 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv |
DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBehavior, const ResourceRequest&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&); |
+ void clear(); |
+ |
// ResourceClient |
+ // |
+ // |this| may be dead after calling this method. |
void notifyFinished(Resource*) override; |
+ |
// RawResourceClient |
+ // |
+ // |this| may be dead after calling these methods. |
void dataSent(Resource*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) override; |
void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<WebDataConsumerHandle>) override; |
void setSerializedCachedMetadata(Resource*, const char*, size_t) override; |
@@ -84,34 +92,50 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv |
void dataDownloaded(Resource*, int) override; |
void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) override; |
+ // |this| may be dead after calling this method in async mode. |
void cancelWithError(const ResourceError&); |
// Notify Inspector and log to console about resource response. Use |
// this method if response is not going to be finished normally. |
void reportResponseReceived(unsigned long identifier, const ResourceResponse&); |
- // Methods containing code to handle resource fetch results which is |
+ // Methods containing code to handle resource fetch results which are |
// common to both sync and async mode. |
+ // |
+ // |this| may be dead after calling these method in async mode. |
void handleResponse(unsigned long identifier, const ResourceResponse&, PassOwnPtr<WebDataConsumerHandle>); |
void handleReceivedData(const char* data, unsigned dataLength); |
+ void handleSuccessfulActualRequestFinish(unsigned long identifier, double finishTime); |
void handleSuccessfulFinish(unsigned long identifier, double finishTime); |
+ // |this| may be dead after calling this method. |
void didTimeout(Timer<DocumentThreadableLoader>*); |
// Calls the appropriate loading method according to policy and data |
// about origin. Only for handling the initial load (including fallback |
// after consulting ServiceWorker). |
+ // |
+ // |this| may be dead after calling this method in async mode. |
void dispatchInitialRequest(const ResourceRequest&); |
+ // |this| may be dead after calling this method in async mode. |
void makeCrossOriginAccessRequest(const ResourceRequest&); |
// Loads m_fallbackRequestForServiceWorker. |
+ // |
+ // |this| may be dead after calling this method in async mode. |
void loadFallbackRequestForServiceWorker(); |
// Loads m_actualRequest. |
void loadActualRequest(); |
// Clears m_actualRequest and reports access control check failure to |
// m_client. |
+ // |
+ // |this| may be dead after calling this method in async mode. |
void handlePreflightFailure(const String& url, const String& errorDescription); |
// Investigates the response for the preflight request. If successful, |
// the actual request will be made later in handleSuccessfulFinish(). |
+ // |
+ // |this| may be dead after calling this method in async mode. |
void handlePreflightResponse(const ResourceResponse&); |
+ // |this| may be dead after calling this method. |
+ void handleError(const ResourceError&); |
void loadRequest(const ResourceRequest&, ResourceLoaderOptions); |
bool isAllowedRedirect(const KURL&) const; |