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

Unified Diff: third_party/WebKit/Source/platform/heap/Handle.h

Issue 1580883002: Oilpan: move AsyncMethodRunner to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename to RawPtrOrMemberTrait<> Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/platform/AsyncMethodRunner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..950ba50bc56ae12be74c01a1b54d0b8e5f7d0d49 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 RawPtrOrMemberTrait {
+public:
+ using Type = RawPtr<T>;
+};
+
+template<typename T>
+class RawPtrOrMemberTrait<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,19 +1229,7 @@ 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;
+ typename RawPtrOrMemberTrait<T>::Type m_object;
};
// SelfKeepAlive<Object> is the idiom to use for objects that have to keep
« no previous file with comments | « third_party/WebKit/Source/platform/AsyncMethodRunner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698