Index: base/stack_container.h |
diff --git a/base/stack_container.h b/base/stack_container.h |
index 06ef2a4f576804231d0bb5b597c3ec9482069063..ca7e0172ad1e4da79f4f863aad7fdd7c65f03e2b 100644 |
--- a/base/stack_container.h |
+++ b/base/stack_container.h |
@@ -10,6 +10,7 @@ |
#include <vector> |
#include "base/basictypes.h" |
+#include "build/build_config.h" |
#include "base/memory/aligned_memory.h" |
// This allocator can be used with STL containers to provide a stack buffer |
@@ -53,6 +54,9 @@ class StackAllocator : public std::allocator<T> { |
// constructors and destructors to be automatically called. Define a POD |
// buffer of the right size instead. |
base::AlignedMemory<sizeof(T[stack_capacity]), ALIGNOF(T)> stack_buffer_; |
+#if defined(OS_ANDROID) |
+ COMPILE_ASSERT(ALIGNOF(T) <= 16, crbug_115612); |
+#endif |
// Set when the stack buffer is used for an allocation. We do not track |
// how much of the buffer is used, only that somebody is using it. |