WTF::SentinelLinkedList has three problems. Even though it has begin() and end(), using SentinelLinkedList with range-for loop results in a broken node because iterator::operator++ doesn't work as expected. If I use a SentinelLinkedList in a movable type, the sentinel pointer gets stale. It doesn't have const_iterator.
Created attachment 453366 [details] Patch
Created attachment 453381 [details] Patch
Created attachment 453382 [details] Patch
Comment on attachment 453382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453382&action=review r=me > Source/WTF/wtf/SentinelLinkedList.h:89 > + BaseIterator(RawNodeType* node) Let's make it `explicit` constructor.
Comment on attachment 453382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453382&action=review Thank you very much for the review. >> Source/WTF/wtf/SentinelLinkedList.h:89 >> + BaseIterator(RawNodeType* node) > > Let's make it `explicit` constructor. It's a good idea. But, I did this because there are some existing code assuming an iterator can compare with a node pointer. But, It seeds a bad idea comparing an iterator without deference. I'm going to rewrite them.
Created attachment 453534 [details] Patch for landing
Comment on attachment 453534 [details] Patch for landing Clearing flags on attachment: 453534 Committed r290705 (247954@trunk): <https://commits.webkit.org/247954@trunk>
All reviewed patches have been landed. Closing bug.
<rdar://problem/89646622>