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

Unified Diff: third_party/WebKit/Source/web/AssociatedURLLoader.h

Issue 1862073002: Let AssociatedURLLoader listen to destruction of the Document used for loading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment to RELEASE_ASSERT Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/AssociatedURLLoader.h
diff --git a/third_party/WebKit/Source/web/AssociatedURLLoader.h b/third_party/WebKit/Source/web/AssociatedURLLoader.h
index 4f22667855cf4999bb79e569a1d85b6fbfec67a1..d689a342476609b404ce6f04a108f6ec0129182b 100644
--- a/third_party/WebKit/Source/web/AssociatedURLLoader.h
+++ b/third_party/WebKit/Source/web/AssociatedURLLoader.h
@@ -57,15 +57,26 @@ public:
void setDefersLoading(bool) override;
void setLoadingTaskRunner(blink::WebTaskRunner*) override;
-private:
+ // Called by |m_observer| to handle destruction of the Document associated
+ // with the frame given to the constructor.
+ void documentDestroyed();
+ void disposeObserver();
+private:
class ClientAdapter;
+ class Observer;
- Persistent<WebLocalFrameImpl> m_frameImpl;
- WebURLLoaderOptions m_options;
WebURLLoaderClient* m_client;
+ WebURLLoaderOptions m_options;
+
+ // An adapter which converts the DocumentThreadableLoaderClient method
+ // calls into the WebURLLoaderClient method calls.
OwnPtr<ClientAdapter> m_clientAdapter;
OwnPtr<DocumentThreadableLoader> m_loader;
+
+ // A DocumentLifecycleObserver for cancelling |m_loader| when the Document
yhirano 2016/04/08 07:24:02 ContextLifecycleObserver
tyoshino (SeeGerritForStatus) 2016/04/08 07:57:26 Done.
+ // is detached.
+ Persistent<Observer> m_observer;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698