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

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

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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
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 23 matching lines...) Expand all
34 #include "wtf/RefCounted.h" 34 #include "wtf/RefCounted.h"
35 #include "wtf/RefPtr.h" 35 #include "wtf/RefPtr.h"
36 #include "wtf/ThreadRestrictionVerifier.h" 36 #include "wtf/ThreadRestrictionVerifier.h"
37 #include "wtf/Vector.h" 37 #include "wtf/Vector.h"
38 #include "wtf/text/AtomicString.h" 38 #include "wtf/text/AtomicString.h"
39 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
40 #include <memory> 40 #include <memory>
41 41
42 namespace WTF { 42 namespace WTF {
43 43
44 #if ENABLE(ASSERT) || ENABLE(SECURITY_ASSERT) 44 #if DCHECK_IS_ON() || ENABLE(SECURITY_ASSERT)
45 // The debug/assertion version may get bigger. 45 // The debug/assertion version may get bigger.
46 struct SameSizeAsRefCounted { 46 struct SameSizeAsRefCounted {
47 int a; 47 int a;
48 #if ENABLE(SECURITY_ASSERT) 48 #if ENABLE(SECURITY_ASSERT)
49 bool b; 49 bool b;
50 #endif 50 #endif
51 #if ENABLE(ASSERT) 51 #if DCHECK_IS_ON()
52 bool c; 52 bool c;
53 ThreadRestrictionVerifier d; 53 ThreadRestrictionVerifier d;
54 #endif 54 #endif
55 }; 55 };
56 #else 56 #else
57 struct SameSizeAsRefCounted { 57 struct SameSizeAsRefCounted {
58 int a; 58 int a;
59 // Don't add anything here because this should stay small. 59 // Don't add anything here because this should stay small.
60 }; 60 };
61 #endif 61 #endif
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 static_assert(sizeof(Vector<int, 1>) == 94 static_assert(sizeof(Vector<int, 1>) ==
95 sizeof(SameSizeAsVectorWithInlineCapacity<int, 1>), 95 sizeof(SameSizeAsVectorWithInlineCapacity<int, 1>),
96 "Vector should stay small"); 96 "Vector should stay small");
97 static_assert(sizeof(Vector<int, 2>) == 97 static_assert(sizeof(Vector<int, 2>) ==
98 sizeof(SameSizeAsVectorWithInlineCapacity<int, 2>), 98 sizeof(SameSizeAsVectorWithInlineCapacity<int, 2>),
99 "Vector should stay small"); 99 "Vector should stay small");
100 static_assert(sizeof(Vector<int, 3>) == 100 static_assert(sizeof(Vector<int, 3>) ==
101 sizeof(SameSizeAsVectorWithInlineCapacity<int, 3>), 101 sizeof(SameSizeAsVectorWithInlineCapacity<int, 3>),
102 "Vector should stay small"); 102 "Vector should stay small");
103 } // namespace WTF 103 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/RefCounted.h ('k') | third_party/WebKit/Source/wtf/StdLibExtras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698