AutoUnlock is a helper that will Release() the |lock| argument in the constructor, and re-Acquire() it in the destructor.
| 144 | // AutoUnlock is a helper that will Release() the |lock| argument in the |
| 145 | // constructor, and re-Acquire() it in the destructor. |
| 146 | class AutoUnlock { |
| 147 | public: |
| 148 | explicit AutoUnlock(Lock& lock) : lock_(lock) { |
| 149 | // We require our caller to have the lock. |
| 150 | lock_.AssertAcquired(); |
| 151 | lock_.Release(); |
| 152 | } |
| 153 | |
| 154 | ~AutoUnlock() { lock_.Acquire(); } |
| 155 | |
| 156 | private: |
| 157 | Lock& lock_; |
| 158 | DISALLOW_COPY_AND_ASSIGN(AutoUnlock); |
| 159 | }; |
| 160 | |
| 161 | } // namespace cef_internal |
| 162 |
nothing calls this directly
no outgoing calls
no test coverage detected