Chromium Code Reviews| Index: third_party/WebKit/Source/platform/heap/Handle.h |
| diff --git a/third_party/WebKit/Source/platform/heap/Handle.h b/third_party/WebKit/Source/platform/heap/Handle.h |
| index 249ce744d2740e1514dbc952152a2c3f1cf0f84c..14b6b9a378da781bb782228be7f95d475395ac45 100644 |
| --- a/third_party/WebKit/Source/platform/heap/Handle.h |
| +++ b/third_party/WebKit/Source/platform/heap/Handle.h |
| @@ -1196,6 +1196,18 @@ template<typename T> PassOwnPtrWillBeRawPtr<T> adoptPtrWillBeNoop(T* ptr) { retu |
| #endif // ENABLE(OILPAN) |
| +template<typename T, bool = IsGarbageCollectedType<T>::value> |
| +class PointerFieldStorageTrait { |
|
haraken
2016/01/13 07:41:56
RawPtrOrMemberTrait ?
sof
2016/01/13 09:41:17
Done, little confusion about what it offers with s
|
| +public: |
| +using Type = RawPtr<T>; |
|
haraken
2016/01/13 07:41:56
4 indentation
sof
2016/01/13 09:41:17
Done.
|
| +}; |
| + |
| +template<typename T> |
| +class PointerFieldStorageTrait<T, true> { |
| +public: |
| + using Type = Member<T>; |
| +}; |
| + |
| // Abstraction for injecting calls to an object's 'dispose()' method |
| // on leaving a stack scope, ensuring earlier release of resources |
| // than waiting until the object is eventually GCed. |
| @@ -1217,18 +1229,6 @@ public: |
| void clear() { m_object.clear(); } |
| private: |
| - template<typename U, bool = IsGarbageCollectedType<U>::value> |
| - class PointerFieldStorageTrait { |
| - public: |
| - using Type = RawPtr<U>; |
| - }; |
| - |
| - template<typename U> |
| - class PointerFieldStorageTrait<U, true> { |
| - public: |
| - using Type = Member<U>; |
| - }; |
| - |
| typename PointerFieldStorageTrait<T>::Type m_object; |
| }; |