Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / base / signalthread.h
index a97bda1..8e18be6 100644 (file)
@@ -115,16 +115,17 @@ class SignalThread
     DISALLOW_IMPLICIT_CONSTRUCTORS(Worker);
   };
 
-  class EnterExit {
+  class SCOPED_LOCKABLE EnterExit {
    public:
-    explicit EnterExit(SignalThread* t) : t_(t) {
+    explicit EnterExit(SignalThread* t) EXCLUSIVE_LOCK_FUNCTION(t->cs_)
+        : t_(t) {
       t_->cs_.Enter();
       // If refcount_ is zero then the object has already been deleted and we
       // will be double-deleting it in ~EnterExit()! (shouldn't happen)
       ASSERT(t_->refcount_ != 0);
       ++t_->refcount_;
     }
-    ~EnterExit() {
+    ~EnterExit() UNLOCK_FUNCTION() {
       bool d = (0 == --t_->refcount_);
       t_->cs_.Leave();
       if (d)