Chromium Code Reviews| Index: third_party/WebKit/Source/platform/heap/WrapperVisitor.h |
| diff --git a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h |
| index f85668a4fb69d1b32166534e3db7941cd72ec32a..6b2130fe7ad6d93b3fa78f0f7d6a4a9fbdbf20ee 100644 |
| --- a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h |
| +++ b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h |
| @@ -93,10 +93,9 @@ class PLATFORM_EXPORT WrapperVisitor { |
| template <typename T> |
| void traceWrappers(const T* traceable) const { |
| static_assert(sizeof(T), "T must be fully defined"); |
| - // Ideally, we'd assert that we can cast to TraceWrapperBase here. |
| - static_assert( |
| - IsGarbageCollectedType<T>::value, |
| - "Only garbage collected objects can be used in traceWrappers()."); |
| + static_assert(CanTraceWrappers<T>::value, |
| + "T should be able to trace wrappers. See " |
| + "dispatchTraceWrappers in WrapperVisitor.h"); |
| if (!traceable) { |
| return; |
| @@ -106,7 +105,8 @@ class PLATFORM_EXPORT WrapperVisitor { |
| return; |
| } |
| - pushToMarkingDeque(TraceTrait<T>::markWrapper, |
| + TraceTrait<T>::markWrapperHeaderOnly(this, traceable); |
| + pushToMarkingDeque(TraceTrait<T>::traceMarkedWrapper, |
|
haraken
2016/12/21 01:38:37
Why can't we simply use markAndTraceWrapper?
Michael Lippautz
2016/12/21 09:31:08
We could but it would add duplicates to the markin
|
| TraceTrait<T>::heapObjectHeader, traceable); |
| } |