Title: [204354] trunk/Source/WTF
- Revision
- 204354
- Author
- [email protected]
- Date
- 2016-08-10 14:23:20 -0700 (Wed, 10 Aug 2016)
Log Message
[JSC] TinyPtrSet::deleteListIfNecessary() no longer needs to test for reservedValue
https://bugs.webkit.org/show_bug.cgi?id=160721
Patch by Benjamin Poulain <[email protected]> on 2016-08-10
Reviewed by Sam Weinig.
Previously, TinyPtrSet was using a ThinFlag if there was no OutOfLineList.
A side effect is that isThin() was false for reservedValue. When deleting
the list, we had to consider both cases: isThin() and reservedValue.
In r204065, I changed the flag to a FatFlag to ensure TinyPtrSet can be initialized
with bzero().
This changes the value of isThin() of reservedValue to true since reservedValue
does not have the FatFlag bit set.
This patch removes the useless condition from deleteListIfNecessary().
* wtf/TinyPtrSet.h:
(WTF::TinyPtrSet::deleteListIfNecessary):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (204353 => 204354)
--- trunk/Source/WTF/ChangeLog 2016-08-10 21:20:47 UTC (rev 204353)
+++ trunk/Source/WTF/ChangeLog 2016-08-10 21:23:20 UTC (rev 204354)
@@ -1,3 +1,23 @@
+2016-08-10 Benjamin Poulain <[email protected]>
+
+ [JSC] TinyPtrSet::deleteListIfNecessary() no longer needs to test for reservedValue
+ https://bugs.webkit.org/show_bug.cgi?id=160721
+
+ Reviewed by Sam Weinig.
+
+ Previously, TinyPtrSet was using a ThinFlag if there was no OutOfLineList.
+ A side effect is that isThin() was false for reservedValue. When deleting
+ the list, we had to consider both cases: isThin() and reservedValue.
+
+ In r204065, I changed the flag to a FatFlag to ensure TinyPtrSet can be initialized
+ with bzero().
+ This changes the value of isThin() of reservedValue to true since reservedValue
+ does not have the FatFlag bit set.
+ This patch removes the useless condition from deleteListIfNecessary().
+
+ * wtf/TinyPtrSet.h:
+ (WTF::TinyPtrSet::deleteListIfNecessary):
+
2016-08-09 Sam Weinig <[email protected]>
Fix windows build.
Modified: trunk/Source/WTF/wtf/TinyPtrSet.h (204353 => 204354)
--- trunk/Source/WTF/wtf/TinyPtrSet.h 2016-08-10 21:20:47 UTC (rev 204353)
+++ trunk/Source/WTF/wtf/TinyPtrSet.h 2016-08-10 21:23:20 UTC (rev 204354)
@@ -459,8 +459,10 @@
ALWAYS_INLINE void deleteListIfNecessary()
{
- if (!isThin() && m_pointer != reservedValue)
+ if (!isThin()) {
+ ASSERT(m_pointer != reservedValue);
OutOfLineList::destroy(list());
+ }
}
bool isThin() const { return !(m_pointer & fatFlag); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes