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

Side by Side Diff: sky/engine/bindings/core/v8/Nullable.h

Issue 679113005: Hollow out more of the tracing system in oilpan (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/engine/bindings/core/v8/ScriptPromiseProperty.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Nullable_h 5 #ifndef Nullable_h
6 #define Nullable_h 6 #define Nullable_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // See comment in RefPtr.h about what UnspecifiedBoolType is. 45 // See comment in RefPtr.h about what UnspecifiedBoolType is.
46 typedef const T* UnspecifiedBoolType; 46 typedef const T* UnspecifiedBoolType;
47 operator UnspecifiedBoolType() const { return m_isNull ? 0 : &m_value; } 47 operator UnspecifiedBoolType() const { return m_isNull ? 0 : &m_value; }
48 48
49 bool operator==(const Nullable& other) const 49 bool operator==(const Nullable& other) const
50 { 50 {
51 return (m_isNull && other.m_isNull) || (!m_isNull && !other.m_isNull && m_value == other.m_value); 51 return (m_isNull && other.m_isNull) || (!m_isNull && !other.m_isNull && m_value == other.m_value);
52 } 52 }
53 53
54 void trace(Visitor* visitor)
55 {
56 TraceIfNeeded<T>::trace(visitor, &m_value);
57 }
58
59 private: 54 private:
60 T m_value; 55 T m_value;
61 bool m_isNull; 56 bool m_isNull;
62 }; 57 };
63 58
64 } // namespace blink 59 } // namespace blink
65 60
66 #endif // Nullable_h 61 #endif // Nullable_h
OLDNEW
« no previous file with comments | « no previous file | sky/engine/bindings/core/v8/ScriptPromiseProperty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698