| 40 | } |
| 41 | |
| 42 | WeakReference WeakReferenceOwner::GetRef() const { |
| 43 | // If we hold the last reference to the Flag then create a new one. |
| 44 | if (!HasRefs()) |
| 45 | flag_ = new WeakReference::Flag(); |
| 46 | |
| 47 | return WeakReference(flag_.get()); |
| 48 | } |
| 49 | |
| 50 | void WeakReferenceOwner::Invalidate() { |
| 51 | if (flag_.get()) { |
no test coverage detected