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

Side by Side Diff: third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp

Issue 1828163002: Remove ASSERT_ARG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Lars Knoll <lars@trolltech.com> 2 * Copyright (C) 2006 Lars Knoll <lars@trolltech.com>
3 * Copyright (C) 2007, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2011, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 } 76 }
77 77
78 ASSERT(!m_vendedIterators.contains(iterator)); 78 ASSERT(!m_vendedIterators.contains(iterator));
79 m_vendedIterators.set(iterator, locale); 79 m_vendedIterators.set(iterator, locale);
80 return iterator; 80 return iterator;
81 } 81 }
82 82
83 void put(icu::BreakIterator* iterator) 83 void put(icu::BreakIterator* iterator)
84 { 84 {
85 ASSERT_ARG(iterator, m_vendedIterators.contains(iterator)); 85 DCHECK(m_vendedIterators.contains(iterator));
86 86
87 if (m_pool.size() == capacity) { 87 if (m_pool.size() == capacity) {
88 delete(m_pool[0].second); 88 delete(m_pool[0].second);
89 m_pool.remove(0); 89 m_pool.remove(0);
90 } 90 }
91 91
92 m_pool.append(Entry(m_vendedIterators.take(iterator), iterator)); 92 m_pool.append(Entry(m_vendedIterators.take(iterator), iterator));
93 } 93 }
94 94
95 private: 95 private:
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 return 0; 587 return 0;
588 } 588 }
589 589
590 utext_close(text); 590 utext_close(text);
591 591
592 return iterator; 592 return iterator;
593 } 593 }
594 594
595 void releaseLineBreakIterator(TextBreakIterator* iterator) 595 void releaseLineBreakIterator(TextBreakIterator* iterator)
596 { 596 {
597 ASSERT_ARG(iterator, iterator); 597 DCHECK(iterator);
598
599 LineBreakIteratorPool::sharedPool().put(iterator); 598 LineBreakIteratorPool::sharedPool().put(iterator);
600 } 599 }
601 600
602 static TextBreakIterator* nonSharedCharacterBreakIterator; 601 static TextBreakIterator* nonSharedCharacterBreakIterator;
603 602
604 static inline bool compareAndSwapNonSharedCharacterBreakIterator(TextBreakIterat or* expected, TextBreakIterator* newValue) 603 static inline bool compareAndSwapNonSharedCharacterBreakIterator(TextBreakIterat or* expected, TextBreakIterator* newValue)
605 { 604 {
606 DEFINE_STATIC_LOCAL(Mutex, nonSharedCharacterBreakIteratorMutex, ()); 605 DEFINE_STATIC_LOCAL(Mutex, nonSharedCharacterBreakIteratorMutex, ());
607 MutexLocker locker(nonSharedCharacterBreakIteratorMutex); 606 MutexLocker locker(nonSharedCharacterBreakIteratorMutex);
608 if (nonSharedCharacterBreakIterator != expected) 607 if (nonSharedCharacterBreakIterator != expected)
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 "$Tel1 $TelV $Tel0;" // Telugu Virama (backward) 835 "$Tel1 $TelV $Tel0;" // Telugu Virama (backward)
837 "$Kan1 $KanV $Kan0;" // Kannada Virama (backward) 836 "$Kan1 $KanV $Kan0;" // Kannada Virama (backward)
838 "$Mal1 $MalV $Mal0;" // Malayalam Virama (backward) 837 "$Mal1 $MalV $Mal0;" // Malayalam Virama (backward)
839 "!!safe_reverse;" 838 "!!safe_reverse;"
840 "!!safe_forward;"; 839 "!!safe_forward;";
841 840
842 return setUpIteratorWithRules(kRules, string, length); 841 return setUpIteratorWithRules(kRules, string, length);
843 } 842 }
844 843
845 } // namespace blink 844 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698