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

Unified Diff: Source/wtf/SizeLimits.cpp

Issue 205583005: Introduce String and AtomicString size check (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/SizeLimits.cpp
diff --git a/Source/wtf/SizeLimits.cpp b/Source/wtf/SizeLimits.cpp
index ba20af3c6dfa2a086b63c58b9b434009afc860c3..9b591fb27adb8cb9befe49e168daf2e70e377806 100644
--- a/Source/wtf/SizeLimits.cpp
+++ b/Source/wtf/SizeLimits.cpp
@@ -37,6 +37,8 @@
#include "wtf/RefPtr.h"
#include "wtf/ThreadRestrictionVerifier.h"
#include "wtf/Vector.h"
+#include "wtf/text/AtomicString.h"
+#include "wtf/text/WTFString.h"
namespace WTF {
@@ -78,6 +80,8 @@ COMPILE_ASSERT(sizeof(OwnPtr<int>) == sizeof(int*), OwnPtr_should_stay_small);
COMPILE_ASSERT(sizeof(PassRefPtr<RefCounted<int> >) == sizeof(int*), PassRefPtr_should_stay_small);
COMPILE_ASSERT(sizeof(RefCounted<int>) == sizeof(SameSizeAsRefCounted), RefCounted_should_stay_small);
COMPILE_ASSERT(sizeof(RefPtr<RefCounted<int> >) == sizeof(int*), RefPtr_should_stay_small);
+COMPILE_ASSERT(sizeof(String) == sizeof(int*), String_should_stay_small);
+COMPILE_ASSERT(sizeof(AtomicString) == sizeof(String), AtomicString_should_stay_small);
abarth-chromium 2014/03/21 17:12:22 We already have this compile assert somewhere else
COMPILE_ASSERT(sizeof(Vector<int>) == sizeof(SameSizeAsVectorWithInlineCapacity<int>), Vector_should_stay_small);
COMPILE_ASSERT(sizeof(Vector<int, 1>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 1>), Vector_should_stay_small);
COMPILE_ASSERT(sizeof(Vector<int, 2>) == sizeof(SameSizeAsVectorWithInlineCapacity<int, 2>), Vector_should_stay_small);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698