Chromium Code Reviews| Index: src/platform/mutex.h |
| diff --git a/src/platform/mutex.h b/src/platform/mutex.h |
| index 19405424102c377130f08e071387d1c616e49ab7..96832ceb41a45c150de423c405b3a00ed59e80ca 100644 |
| --- a/src/platform/mutex.h |
| +++ b/src/platform/mutex.h |
| @@ -40,6 +40,9 @@ |
| namespace v8 { |
| namespace internal { |
| +// Forward declarations. |
| +class ConditionVariable; |
|
Michael Starzinger
2013/09/02 19:12:43
There should be no need to forward declare this if
Benedikt Meurer
2013/09/03 07:27:39
Done.
|
| + |
| // ---------------------------------------------------------------------------- |
| // Mutex |
| // |
| @@ -94,6 +97,22 @@ class Mutex V8_FINAL { |
| int level_; |
| #endif |
| + V8_INLINE(void CheckHeldAndUnmark()) { |
|
Michael Starzinger
2013/09/02 19:12:43
nit: s/Check/Assert/, we use "check" to describe p
Benedikt Meurer
2013/09/03 07:27:39
Done.
|
| +#ifdef DEBUG |
| + ASSERT_EQ(1, level_); |
| + level_--; |
| +#endif |
| + } |
| + |
| + V8_INLINE(void CheckUnheldAndMark()) { |
|
Michael Starzinger
2013/09/02 19:12:43
Likewise.
Benedikt Meurer
2013/09/03 07:27:39
Done.
|
| +#ifdef DEBUG |
| + ASSERT_EQ(0, level_); |
| + level_++; |
| +#endif |
| + } |
| + |
| + friend class ConditionVariable; |
| + |
| DISALLOW_COPY_AND_ASSIGN(Mutex); |
| }; |