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

Unified Diff: Source/heap/Visitor.h

Issue 23042005: [oilpan] Fix iterators over member collections to return Result<T> (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 4 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
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)
{
« Source/heap/Handle.h ('K') | « Source/heap/Handle.h ('k') | Source/heap/tests/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698