From 002c131055c7e25f442629de9534f7dc93af614b Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Wed, 4 Jun 2014 15:19:51 -0400 Subject: [PATCH] Bug 1020118 - fix atomic add/sub for pointer types on Win64; r=jcranmer --- mfbt/Atomics.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mfbt/Atomics.h b/mfbt/Atomics.h index 224de27b06bf..96e4e982db36 100644 --- a/mfbt/Atomics.h +++ b/mfbt/Atomics.h @@ -870,13 +870,13 @@ struct IntrinsicAddSub : public IntrinsicApplyHelper static ValueType add(ValueType& aPtr, ptrdiff_t aAmount) { return applyBinaryFunction(&Primitives::add, aPtr, - (ValueType)(aAmount * sizeof(ValueType))); + (ValueType)(aAmount * sizeof(T))); } static ValueType sub(ValueType& aPtr, ptrdiff_t aAmount) { return applyBinaryFunction(&Primitives::sub, aPtr, - (ValueType)(aAmount * sizeof(ValueType))); + (ValueType)(aAmount * sizeof(T))); } };