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

Side by Side Diff: Source/wtf/SizeLimits.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/wtf/RefCountedLeakCounter.cpp ('k') | Source/wtf/TerminatedArrayBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "wtf/PassRefPtr.h" 35 #include "wtf/PassRefPtr.h"
36 #include "wtf/RefCounted.h" 36 #include "wtf/RefCounted.h"
37 #include "wtf/RefPtr.h" 37 #include "wtf/RefPtr.h"
38 #include "wtf/ThreadRestrictionVerifier.h" 38 #include "wtf/ThreadRestrictionVerifier.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 #include "wtf/text/AtomicString.h" 40 #include "wtf/text/AtomicString.h"
41 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
42 42
43 namespace WTF { 43 namespace WTF {
44 44
45 #if !defined(NDEBUG) || ENABLE(SECURITY_ASSERT) 45 #if ENABLE(ASSERT) || ENABLE(SECURITY_ASSERT)
46 // The debug/assertion version may get bigger. 46 // The debug/assertion version may get bigger.
47 struct SameSizeAsRefCounted { 47 struct SameSizeAsRefCounted {
48 int a; 48 int a;
49 #if ENABLE(SECURITY_ASSERT) 49 #if ENABLE(SECURITY_ASSERT)
50 bool b; 50 bool b;
51 #endif 51 #endif
52 #if !defined(NDEBUG) 52 #if ENABLE(ASSERT)
53 bool c; 53 bool c;
54 ThreadRestrictionVerifier d; 54 ThreadRestrictionVerifier d;
55 #endif 55 #endif
56 }; 56 };
57 #else 57 #else
58 struct SameSizeAsRefCounted { 58 struct SameSizeAsRefCounted {
59 int a; 59 int a;
60 // Don't add anything here because this should stay small. 60 // Don't add anything here because this should stay small.
61 }; 61 };
62 #endif 62 #endif
(...skipping 17 matching lines...) Expand all
80 COMPILE_ASSERT(sizeof(PassRefPtr<RefCounted<int> >) == sizeof(int*), PassRefPtr_ should_stay_small); 80 COMPILE_ASSERT(sizeof(PassRefPtr<RefCounted<int> >) == sizeof(int*), PassRefPtr_ should_stay_small);
81 COMPILE_ASSERT(sizeof(RefCounted<int>) == sizeof(SameSizeAsRefCounted), RefCount ed_should_stay_small); 81 COMPILE_ASSERT(sizeof(RefCounted<int>) == sizeof(SameSizeAsRefCounted), RefCount ed_should_stay_small);
82 COMPILE_ASSERT(sizeof(RefPtr<RefCounted<int> >) == sizeof(int*), RefPtr_should_s tay_small); 82 COMPILE_ASSERT(sizeof(RefPtr<RefCounted<int> >) == sizeof(int*), RefPtr_should_s tay_small);
83 COMPILE_ASSERT(sizeof(String) == sizeof(int*), String_should_stay_small); 83 COMPILE_ASSERT(sizeof(String) == sizeof(int*), String_should_stay_small);
84 COMPILE_ASSERT(sizeof(AtomicString) == sizeof(String), AtomicString_should_stay_ small); 84 COMPILE_ASSERT(sizeof(AtomicString) == sizeof(String), AtomicString_should_stay_ small);
85 COMPILE_ASSERT(sizeof(Vector<int>) == sizeof(SameSizeAsVectorWithInlineCapacity< int>), Vector_should_stay_small); 85 COMPILE_ASSERT(sizeof(Vector<int>) == sizeof(SameSizeAsVectorWithInlineCapacity< int>), Vector_should_stay_small);
86 COMPILE_ASSERT(sizeof(Vector<int, 1>) == sizeof(SameSizeAsVectorWithInlineCapaci ty<int, 1>), Vector_should_stay_small); 86 COMPILE_ASSERT(sizeof(Vector<int, 1>) == sizeof(SameSizeAsVectorWithInlineCapaci ty<int, 1>), Vector_should_stay_small);
87 COMPILE_ASSERT(sizeof(Vector<int, 2>) == sizeof(SameSizeAsVectorWithInlineCapaci ty<int, 2>), Vector_should_stay_small); 87 COMPILE_ASSERT(sizeof(Vector<int, 2>) == sizeof(SameSizeAsVectorWithInlineCapaci ty<int, 2>), Vector_should_stay_small);
88 COMPILE_ASSERT(sizeof(Vector<int, 3>) == sizeof(SameSizeAsVectorWithInlineCapaci ty<int, 3>), Vector_should_stay_small); 88 COMPILE_ASSERT(sizeof(Vector<int, 3>) == sizeof(SameSizeAsVectorWithInlineCapaci ty<int, 3>), Vector_should_stay_small);
89 } 89 }
OLDNEW
« no previous file with comments | « Source/wtf/RefCountedLeakCounter.cpp ('k') | Source/wtf/TerminatedArrayBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698