Chromium Code Reviews| Index: Source/bindings/core/v8/Nullable.h |
| diff --git a/Source/bindings/core/v8/Nullable.h b/Source/bindings/core/v8/Nullable.h |
| index 6d3cb441a790f2c515ad27c55221c621e7d0c893..f019f7f53a9874a7fd856209a4837308ff41b54c 100644 |
| --- a/Source/bindings/core/v8/Nullable.h |
| +++ b/Source/bindings/core/v8/Nullable.h |
| @@ -33,7 +33,13 @@ public: |
| return *this; |
| } |
| + void set(const T& value) |
| + { |
| + m_value = value; |
| + m_isNull = false; |
| + } |
| const T& get() const { ASSERT(!m_isNull); return m_value; } |
| + T& get() { ASSERT(!m_isNull); return m_value; } |
| bool isNull() const { return m_isNull; } |
| operator bool() const { return !m_isNull && m_value; } |
|
haraken
2014/08/13 13:07:10
In order to allow implicit conversion to bool but
bashi
2014/08/13 13:45:56
Will do.
bashi
2014/08/15 02:43:53
It turns out we need a meta-function or need to re
|