Chromium Code Reviews| Index: Source/heap/Visitor.h |
| diff --git a/Source/heap/Visitor.h b/Source/heap/Visitor.h |
| index 06c4c1ac5fb2e652479cdfeeceafaf5c46e3cc56..a3d26097405ef78287b07b56c1c7a39addf755d2 100644 |
| --- a/Source/heap/Visitor.h |
| +++ b/Source/heap/Visitor.h |
| @@ -39,6 +39,7 @@ |
| namespace WebCore { |
| template<typename T> class Member; |
| +template<typename T> class Result; |
| #ifndef NDEBUG |
| #define DECLARE_GC_TYPE_MARKER \ |
| @@ -118,6 +119,18 @@ public: |
| AcceptTrait<T>::visit(this, t.raw()); |
| } |
| + // Result version of the one-argument templated visit method. |
|
Mads Ager (chromium)
2013/08/16 10:23:41
Could you expand the comment here to state why thi
Erik Corry
2013/08/16 11:39:27
Done.
|
| + template<typename T> |
| + void visit(const Result<T>& t) |
| + { |
| + if (!t) |
| + return; |
| +#ifndef NDEBUG |
| + AcceptTrait<T>::check(this, t.releaseRaw()); |
| +#endif |
| + AcceptTrait<T>::visit(this, t.releaseRaw()); |
| + } |
| + |
| template<typename T, size_t N> |
| void visit(const Vector<Member<T>, N>& vector) |
| { |