Index: src/atomic-utils.h |
diff --git a/src/atomic-utils.h b/src/atomic-utils.h |
index 2aa78f8b5e22458fed9a9505b9f71f6e029f72e0..34e1cb0269ac37cce1392db05ffd578aae8340b4 100644 |
--- a/src/atomic-utils.h |
+++ b/src/atomic-utils.h |
@@ -19,9 +19,10 @@ class AtomicNumber { |
AtomicNumber() : value_(0) {} |
explicit AtomicNumber(T initial) : value_(initial) {} |
- V8_INLINE void Increment(T increment) { |
- base::Barrier_AtomicIncrement(&value_, |
- static_cast<base::AtomicWord>(increment)); |
+ // Returns the newly set value. |
+ V8_INLINE T Increment(T increment) { |
+ return static_cast<T>(base::Barrier_AtomicIncrement( |
+ &value_, static_cast<base::AtomicWord>(increment))); |
} |
V8_INLINE T Value() { return static_cast<T>(base::Acquire_Load(&value_)); } |