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

Unified Diff: Source/bindings/core/v8/Nullable.h

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have Nullable<T>::trace() use TraceIfNeeded<>. Created 6 years, 5 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/bindings/core/v8/Nullable.h
diff --git a/Source/bindings/core/v8/Nullable.h b/Source/bindings/core/v8/Nullable.h
index 0f8356c472d399a03fad26c4fcbcda01f3f8ce64..2dfef76f7c5241ac105e9ca29fdc47f108af21da 100644
--- a/Source/bindings/core/v8/Nullable.h
+++ b/Source/bindings/core/v8/Nullable.h
@@ -5,12 +5,14 @@
#ifndef Nullable_h
#define Nullable_h
+#include "platform/heap/Handle.h"
#include "wtf/Assertions.h"
namespace WebCore {
template <typename T>
class Nullable {
+ DISALLOW_ALLOCATION();
public:
Nullable()
: m_value()
@@ -41,6 +43,11 @@ public:
return (m_isNull && other.m_isNull) || (!m_isNull && !other.m_isNull && m_value == other.m_value);
}
+ void trace(Visitor* visitor)
+ {
+ TraceIfNeeded<T>::trace(visitor, &m_value);
sof 2014/07/16 12:22:35 I rephrased Nullable to use TraceIfNeeded<> instea
+ }
+
private:
T m_value;
bool m_isNull;

Powered by Google App Engine
This is Rietveld 408576698