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

Side by Side Diff: third_party/WebKit/Source/core/css/SelectorFilter.h

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // With 100 unique strings in the filter, 2^12 slot table has false positive 85 // With 100 unique strings in the filter, 2^12 slot table has false positive
86 // rate of ~0.2%. 86 // rate of ~0.2%.
87 using IdentifierFilter = BloomFilter<12>; 87 using IdentifierFilter = BloomFilter<12>;
88 std::unique_ptr<IdentifierFilter> m_ancestorIdentifierFilter; 88 std::unique_ptr<IdentifierFilter> m_ancestorIdentifierFilter;
89 }; 89 };
90 90
91 template <unsigned maximumIdentifierCount> 91 template <unsigned maximumIdentifierCount>
92 inline bool SelectorFilter::fastRejectSelector( 92 inline bool SelectorFilter::fastRejectSelector(
93 const unsigned* identifierHashes) const { 93 const unsigned* identifierHashes) const {
94 ASSERT(m_ancestorIdentifierFilter); 94 DCHECK(m_ancestorIdentifierFilter);
95 for (unsigned n = 0; n < maximumIdentifierCount && identifierHashes[n]; ++n) { 95 for (unsigned n = 0; n < maximumIdentifierCount && identifierHashes[n]; ++n) {
96 if (!m_ancestorIdentifierFilter->mayContain(identifierHashes[n])) 96 if (!m_ancestorIdentifierFilter->mayContain(identifierHashes[n]))
97 return true; 97 return true;
98 } 98 }
99 return false; 99 return false;
100 } 100 }
101 101
102 } // namespace blink 102 } // namespace blink
103 103
104 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::SelectorFilter::ParentStackFrame); 104 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::SelectorFilter::ParentStackFrame);
105 105
106 #endif 106 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/SelectorChecker.h ('k') | third_party/WebKit/Source/core/css/SelectorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698