Changeset 287629 in webkit
- Timestamp:
- Jan 5, 2022, 10:21:12 AM (5 years ago)
- Location:
- branches/safari-612-branch/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/displaylists/InMemoryDisplayList.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612-branch/Source/WebCore/ChangeLog
r287627 r287629 1 2022-01-05 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r287048. rdar://problem/87125012 4 5 Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList() 6 https://bugs.webkit.org/show_bug.cgi?id=234264 7 8 Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-12-14 9 Reviewed by Myles C. Maxfield. 10 11 The client is not adhearing to the DisplayList Iterator's API contract in MemoryDisplayList::~InMemoryDisplayList(): 12 "Part of the iterator's API contract is that if the item is nullopt, you're not allowed to keep 13 iterating - doing this will lead to an infinite loop." 14 15 Here we now do so by breaking out of iteration if the item is nullopt. 16 17 * platform/graphics/displaylists/InMemoryDisplayList.cpp: 18 (WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList): 19 20 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287048 268f45cc-cd09-0410-ab3c-d52691b4dbfc 21 22 2021-12-14 Gabriel Nava Marino <gnavamarino@apple.com> 23 24 Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList() 25 https://bugs.webkit.org/show_bug.cgi?id=234264 26 27 Reviewed by Myles C. Maxfield. 28 29 The client is not adhearing to the DisplayList Iterator's API contract in MemoryDisplayList::~InMemoryDisplayList(): 30 "Part of the iterator's API contract is that if the item is nullopt, you're not allowed to keep 31 iterating - doing this will lead to an infinite loop." 32 33 Here we now do so by breaking out of iteration if the item is nullopt. 34 35 * platform/graphics/displaylists/InMemoryDisplayList.cpp: 36 (WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList): 37 1 38 2022-01-05 Russell Epstein <repstein@apple.com> 2 39 -
branches/safari-612-branch/Source/WebCore/platform/graphics/displaylists/InMemoryDisplayList.cpp
r278253 r287629 64 64 auto end = this->end(); 65 65 for (auto displayListItem : *this) { 66 if (!displayListItem) 67 break; 66 68 auto item = displayListItem->item; 67 69 ASSERT(item);
Note:
See TracChangeset
for help on using the changeset viewer.