| Index: Source/heap/Visitor.h
|
| diff --git a/Source/heap/Visitor.h b/Source/heap/Visitor.h
|
| index 06c4c1ac5fb2e652479cdfeeceafaf5c46e3cc56..47aecf6ec866301a99bed42ba7cdc0aa3f524db3 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,21 @@ public:
|
| AcceptTrait<T>::visit(this, t.raw());
|
| }
|
|
|
| + // Result version of the one-argument templated visit method. This is used
|
| + // for visiting collections: The iterator returns Result<T> and we visit
|
| + // them. This visitor method is befriended by Result<T> which allows it to
|
| + // use releaseRaw.
|
| + 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)
|
| {
|
|
|