Title: [274193] trunk/Source/WTF
- Revision
- 274193
- Author
- [email protected]
- Date
- 2021-03-09 19:38:23 -0800 (Tue, 09 Mar 2021)
Log Message
Use RELEASE_ASSERT() for Deque bounds checks
https://bugs.webkit.org/show_bug.cgi?id=223008
Reviewed by Alex Christensen.
Use RELEASE_ASSERT() for Deque bounds checks instead of ASSERT(), similarly to what we did for Vector.
* wtf/Deque.h:
(WTF::inlineCapacity>::removeFirst):
(WTF::inlineCapacity>::removeLast):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (274192 => 274193)
--- trunk/Source/WTF/ChangeLog 2021-03-10 03:12:54 UTC (rev 274192)
+++ trunk/Source/WTF/ChangeLog 2021-03-10 03:38:23 UTC (rev 274193)
@@ -1,3 +1,16 @@
+2021-03-09 Chris Dumez <[email protected]>
+
+ Use RELEASE_ASSERT() for Deque bounds checks
+ https://bugs.webkit.org/show_bug.cgi?id=223008
+
+ Reviewed by Alex Christensen.
+
+ Use RELEASE_ASSERT() for Deque bounds checks instead of ASSERT(), similarly to what we did for Vector.
+
+ * wtf/Deque.h:
+ (WTF::inlineCapacity>::removeFirst):
+ (WTF::inlineCapacity>::removeLast):
+
2021-03-09 Sam Weinig <[email protected]>
Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
Modified: trunk/Source/WTF/wtf/Deque.h (274192 => 274193)
--- trunk/Source/WTF/wtf/Deque.h 2021-03-10 03:12:54 UTC (rev 274192)
+++ trunk/Source/WTF/wtf/Deque.h 2021-03-10 03:38:23 UTC (rev 274193)
@@ -78,12 +78,12 @@
template<typename U> bool contains(const U&) const;
- T& first() { ASSERT(m_start != m_end); return m_buffer.buffer()[m_start]; }
- const T& first() const { ASSERT(m_start != m_end); return m_buffer.buffer()[m_start]; }
+ T& first() { RELEASE_ASSERT(m_start != m_end); return m_buffer.buffer()[m_start]; }
+ const T& first() const { RELEASE_ASSERT(m_start != m_end); return m_buffer.buffer()[m_start]; }
T takeFirst();
- T& last() { ASSERT(m_start != m_end); return *(--end()); }
- const T& last() const { ASSERT(m_start != m_end); return *(--end()); }
+ T& last() { RELEASE_ASSERT(m_start != m_end); return *(--end()); }
+ const T& last() const { RELEASE_ASSERT(m_start != m_end); return *(--end()); }
T takeLast();
void append(T&& value) { append<T>(std::forward<T>(value)); }
@@ -499,7 +499,7 @@
{
checkValidity();
invalidateIterators();
- ASSERT(!isEmpty());
+ RELEASE_ASSERT(!isEmpty());
TypeOperations::destruct(std::addressof(m_buffer.buffer()[m_start]), std::addressof(m_buffer.buffer()[m_start + 1]));
if (m_start == m_buffer.capacity() - 1)
m_start = 0;
@@ -513,7 +513,7 @@
{
checkValidity();
invalidateIterators();
- ASSERT(!isEmpty());
+ RELEASE_ASSERT(!isEmpty());
if (!m_end)
m_end = m_buffer.capacity() - 1;
else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes