some reason, it missed define WTF_USE_LOCKFREE_THREADSAFESHARED.
So we are using mutexlocker instead of refcount inc/dec.
Even mutex version should work, but it is not exercised
by win/darwin/gcc. Changing to use refcount version fixed
the crash seen in picasaweb.
Fix http://b/issue?id=
2183371
Maybe fix http://b/issue?id=
2165237. But I can't verify
as I can't reproduce it even before my change.
inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
#elif defined ANDROID
+#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
inline void atomicIncrement(int volatile* addend) { android_atomic_inc(addend); }
inline int atomicDecrement(int volatile* addend) { return android_atomic_dec(addend); }