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 d93767aca69d03f9d53768f55f08a4cf38ba9a85..577410ec22ed269c0d0cfe0c5710c526d675e185 100644 |
| --- a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h |
| +++ b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h |
| @@ -91,6 +91,11 @@ class PLATFORM_EXPORT WrapperVisitor { |
| public: |
| template <typename T> |
| + static void missedWriteBarrier() { |
|
haraken
2017/01/04 23:49:30
Maybe would it be better to add NEVER_INLINE?
Michael Lippautz
2017/01/05 09:10:39
Done.
|
| + NOTREACHED(); |
| + } |
| + |
| + template <typename T> |
| void traceWrappers(const T* traceable) const { |
| static_assert(sizeof(T), "T must be fully defined"); |
| static_assert(CanTraceWrappers<T>::value, |
| @@ -164,7 +169,8 @@ class PLATFORM_EXPORT WrapperVisitor { |
| template <typename T> |
| void markAndPushToMarkingDeque(const T* traceable) const { |
| if (pushToMarkingDeque(TraceTrait<T>::traceMarkedWrapper, |
| - TraceTrait<T>::heapObjectHeader, traceable)) { |
| + TraceTrait<T>::heapObjectHeader, |
| + WrapperVisitor::missedWriteBarrier<T>, traceable)) { |
| TraceTrait<T>::markWrapperNoTracing(this, traceable); |
| } |
| } |
| @@ -174,6 +180,7 @@ class PLATFORM_EXPORT WrapperVisitor { |
| virtual bool pushToMarkingDeque( |
| void (*traceWrappersCallback)(const WrapperVisitor*, const void*), |
| HeapObjectHeader* (*heapObjectHeaderCallback)(const void*), |
| + void (*missedWriteBarrierCallback)(void), |
| const void*) const = 0; |
| }; |