| Index: third_party/WebKit/Source/core/fetch/ResourceOwner.h
|
| diff --git a/third_party/WebKit/Source/core/fetch/ResourceOwner.h b/third_party/WebKit/Source/core/fetch/ResourceOwner.h
|
| index 20a464cfb347ff4b3a6d84617f3cd8bc2de6263c..69822c1f9ea8033943bdf13b8b561af88155d8e4 100644
|
| --- a/third_party/WebKit/Source/core/fetch/ResourceOwner.h
|
| +++ b/third_party/WebKit/Source/core/fetch/ResourceOwner.h
|
| @@ -37,22 +37,20 @@ namespace blink {
|
|
|
|
|
| template<class R, class C = typename R::ClientType>
|
| -class ResourceOwner : public C {
|
| +class ResourceOwner : public WillBeGarbageCollectedMixin, public C {
|
| public:
|
| using ResourceType = R;
|
|
|
| virtual ~ResourceOwner();
|
| ResourceType* resource() const { return m_resource.get(); }
|
|
|
| + DEFINE_INLINE_VIRTUAL_TRACE() {}
|
| +
|
| protected:
|
| ResourceOwner();
|
| - ResourceOwner(const ResourceOwner& other) { setResource(other.resource()); }
|
| - explicit ResourceOwner(const ResourcePtr<ResourceType>&);
|
|
|
| void setResource(const ResourcePtr<ResourceType>&);
|
| - void clearResource();
|
| -
|
| - ResourceOwner& operator=(const ResourceOwner& other);
|
| + void clearResource() { setResource(nullptr); }
|
|
|
| private:
|
| ResourcePtr<ResourceType> m_resource;
|
| @@ -70,14 +68,6 @@ inline ResourceOwner<R, C>::~ResourceOwner()
|
| }
|
|
|
| template<class R, class C>
|
| -inline ResourceOwner<R, C>::ResourceOwner(const ResourcePtr<R>& resource)
|
| - : m_resource(resource)
|
| -{
|
| - if (m_resource)
|
| - m_resource->addClient(this);
|
| -}
|
| -
|
| -template<class R, class C>
|
| inline void ResourceOwner<R, C>::setResource(const ResourcePtr<R>& newResource)
|
| {
|
| if (newResource == m_resource)
|
| @@ -96,21 +86,6 @@ inline void ResourceOwner<R, C>::setResource(const ResourcePtr<R>& newResource)
|
| }
|
| }
|
|
|
| -template<class R, class C>
|
| -inline void ResourceOwner<R, C>::clearResource()
|
| -{
|
| - setResource(0);
|
| -}
|
| -
|
| -template<class R, class C>
|
| -inline ResourceOwner<R, C>& ResourceOwner<R, C>::operator=(const ResourceOwner<R, C>& other)
|
| -{
|
| - if (this == &other)
|
| - return *this;
|
| - setResource(other.resource());
|
| - return *this;
|
| -}
|
| -
|
| } // namespace blink
|
|
|
| #endif
|
|
|