Index: Source/bindings/core/v8/Nullable.h |
diff --git a/Source/bindings/core/v8/Nullable.h b/Source/bindings/core/v8/Nullable.h |
index 0f8356c472d399a03fad26c4fcbcda01f3f8ce64..acda9ad61e8f20ca0e16262996b6bf745725b1c0 100644 |
--- a/Source/bindings/core/v8/Nullable.h |
+++ b/Source/bindings/core/v8/Nullable.h |
@@ -5,12 +5,15 @@ |
#ifndef Nullable_h |
#define Nullable_h |
+#include "platform/heap/Handle.h" |
#include "wtf/Assertions.h" |
+#include "wtf/TypeTraits.h" |
namespace WebCore { |
template <typename T> |
class Nullable { |
+ DISALLOW_ALLOCATION(); |
public: |
Nullable() |
: m_value() |
@@ -41,7 +44,19 @@ public: |
return (m_isNull && other.m_isNull) || (!m_isNull && !other.m_isNull && m_value == other.m_value); |
} |
+ template<typename U = T> |
+ typename WTF::EnableIf<WTF::NeedsTracing<U>::value, void>::Type trace(Visitor* visitor) |
+ { |
+ visitor->trace(m_value); |
+ } |
+ |
private: |
+ // FIXME: Oilpan: the static analyser isn't (yet) able to |
+ // spot the above trace() function template. When Nullable<> |
+ // instantiations over traceable values are then processed, |
+ // it'll report an error. A false negative; the trace() method |
+ // is instantiated. |
+ GC_PLUGIN_IGNORE("393465") |
T m_value; |
bool m_isNull; |
}; |