Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: base/stack_container.h

Issue 9456032: Make StackContainer test pass on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include path Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/stack_container_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | base/stack_container_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698