| 227 | } |
| 228 | |
| 229 | bool IsValid() const { |
| 230 | // Ideally, handling kSentinelPointer would be done by the embedder. On the |
| 231 | // other hand, having Persistent aware of it is beneficial since no node |
| 232 | // gets wasted. |
| 233 | return GetValue() != nullptr && GetValue() != kSentinelPointer; |
| 234 | } |
| 235 | |
| 236 | void Assign(T* ptr) { |
| 237 | if (IsValid()) { |
no outgoing calls
no test coverage detected