| Index: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
|
| diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
|
| index 79e8336d7cd4c0cb5dbb45cb5293dd69c5222cb4..227541be515c738c74ac6cae5ff628d15698b6d3 100644
|
| --- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
|
| +++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
|
| @@ -54,8 +54,7 @@
|
| class SecurityOrigin;
|
| class ThreadableLoaderClient;
|
|
|
| -class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, private ResourceOwner<RawResource> {
|
| - USING_GARBAGE_COLLECTED_MIXIN(DocumentThreadableLoader);
|
| +class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, private RawResourceClient {
|
| public:
|
| static void loadResourceSynchronously(Document&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
|
| static DocumentThreadableLoader* create(Document&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
|
| @@ -151,6 +150,29 @@
|
| // returns allowCredentials value of m_resourceLoaderOptions.
|
| StoredCredentials effectiveAllowCredentials() const;
|
|
|
| + // TODO(oilpan): DocumentThreadableLoader used to be a ResourceOwner,
|
| + // but ResourceOwner was moved onto the oilpan heap before
|
| + // DocumentThreadableLoader was ready. When DocumentThreadableLoader
|
| + // moves onto the oilpan heap, make it a ResourceOwner again and remove
|
| + // this re-implementation of ResourceOwner.
|
| + RawResource* resource() const { return m_resource.get(); }
|
| + void clearResource() { setResource(nullptr); }
|
| + void setResource(RawResource* newResource)
|
| + {
|
| + if (newResource == m_resource)
|
| + return;
|
| +
|
| + if (RawResource* oldResource = m_resource.release())
|
| + oldResource->removeClient(this);
|
| +
|
| + if (newResource) {
|
| + m_resource = newResource;
|
| + m_resource->addClient(this);
|
| + }
|
| + }
|
| + Member<RawResource> m_resource;
|
| + // End of ResourceOwner re-implementation, see above.
|
| +
|
| SecurityOrigin* getSecurityOrigin() const;
|
| Document& document() const;
|
|
|
|
|