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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DisplayItem_h 5 #ifndef DisplayItem_h
6 #define DisplayItem_h 6 #define DisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/ContiguousContainer.h" 9 #include "platform/graphics/ContiguousContainer.h"
10 #include "platform/graphics/paint/DisplayItemClient.h" 10 #include "platform/graphics/paint/DisplayItemClient.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 m_type(type), 220 m_type(type),
221 m_derivedSize(derivedSize), 221 m_derivedSize(derivedSize),
222 m_skippedCache(false) 222 m_skippedCache(false)
223 #ifndef NDEBUG 223 #ifndef NDEBUG
224 , 224 ,
225 m_clientDebugString(client.debugName()) 225 m_clientDebugString(client.debugName())
226 #endif 226 #endif
227 { 227 {
228 // derivedSize must fit in m_derivedSize. 228 // derivedSize must fit in m_derivedSize.
229 // If it doesn't, enlarge m_derivedSize and fix this assert. 229 // If it doesn't, enlarge m_derivedSize and fix this assert.
230 ASSERT_WITH_SECURITY_IMPLICATION(derivedSize < (1 << 8)); 230 SECURITY_DCHECK(derivedSize < (1 << 8));
231 ASSERT_WITH_SECURITY_IMPLICATION(derivedSize >= sizeof(*this)); 231 SECURITY_DCHECK(derivedSize >= sizeof(*this));
232 } 232 }
233 233
234 virtual ~DisplayItem() {} 234 virtual ~DisplayItem() {}
235 235
236 // Ids are for matching new DisplayItems with existing DisplayItems. 236 // Ids are for matching new DisplayItems with existing DisplayItems.
237 struct Id { 237 struct Id {
238 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 238 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
239 Id(const DisplayItemClient& client, const Type type) 239 Id(const DisplayItemClient& client, const Type type)
240 : client(client), type(type) {} 240 : client(client), type(type) {}
241 241
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; 422 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0;
423 #endif 423 #endif
424 424
425 private: 425 private:
426 bool isEnd() const final { return true; } 426 bool isEnd() const final { return true; }
427 }; 427 };
428 428
429 } // namespace blink 429 } // namespace blink
430 430
431 #endif // DisplayItem_h 431 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698