Title: [287629] branches/safari-612-branch/Source/WebCore
- Revision
- 287629
- Author
- repst...@apple.com
- Date
- 2022-01-05 10:21:12 -0800 (Wed, 05 Jan 2022)
Log Message
Cherry-pick r287048. rdar://problem/87125012
Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList()
https://bugs.webkit.org/show_bug.cgi?id=234264
Patch by Gabriel Nava Marino <gnavamar...@apple.com> on 2021-12-14
Reviewed by Myles C. Maxfield.
The client is not adhearing to the DisplayList Iterator's API contract in MemoryDisplayList::~InMemoryDisplayList():
"Part of the iterator's API contract is that if the item is nullopt, you're not allowed to keep
iterating - doing this will lead to an infinite loop."
Here we now do so by breaking out of iteration if the item is nullopt.
* platform/graphics/displaylists/InMemoryDisplayList.cpp:
(WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (287628 => 287629)
--- branches/safari-612-branch/Source/WebCore/ChangeLog 2022-01-05 18:21:08 UTC (rev 287628)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog 2022-01-05 18:21:12 UTC (rev 287629)
@@ -1,5 +1,42 @@
2022-01-05 Russell Epstein <repst...@apple.com>
+ Cherry-pick r287048. rdar://problem/87125012
+
+ Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList()
+ https://bugs.webkit.org/show_bug.cgi?id=234264
+
+ Patch by Gabriel Nava Marino <gnavamar...@apple.com> on 2021-12-14
+ Reviewed by Myles C. Maxfield.
+
+ The client is not adhearing to the DisplayList Iterator's API contract in MemoryDisplayList::~InMemoryDisplayList():
+ "Part of the iterator's API contract is that if the item is nullopt, you're not allowed to keep
+ iterating - doing this will lead to an infinite loop."
+
+ Here we now do so by breaking out of iteration if the item is nullopt.
+
+ * platform/graphics/displaylists/InMemoryDisplayList.cpp:
+ (WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-12-14 Gabriel Nava Marino <gnavamar...@apple.com>
+
+ Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList()
+ https://bugs.webkit.org/show_bug.cgi?id=234264
+
+ Reviewed by Myles C. Maxfield.
+
+ The client is not adhearing to the DisplayList Iterator's API contract in MemoryDisplayList::~InMemoryDisplayList():
+ "Part of the iterator's API contract is that if the item is nullopt, you're not allowed to keep
+ iterating - doing this will lead to an infinite loop."
+
+ Here we now do so by breaking out of iteration if the item is nullopt.
+
+ * platform/graphics/displaylists/InMemoryDisplayList.cpp:
+ (WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList):
+
+2022-01-05 Russell Epstein <repst...@apple.com>
+
Cherry-pick r286940. rdar://problem/85388372
Implement step 17 of main fetch algorithm
Modified: branches/safari-612-branch/Source/WebCore/platform/graphics/displaylists/InMemoryDisplayList.cpp (287628 => 287629)
--- branches/safari-612-branch/Source/WebCore/platform/graphics/displaylists/InMemoryDisplayList.cpp 2022-01-05 18:21:08 UTC (rev 287628)
+++ branches/safari-612-branch/Source/WebCore/platform/graphics/displaylists/InMemoryDisplayList.cpp 2022-01-05 18:21:12 UTC (rev 287629)
@@ -63,6 +63,8 @@
{
auto end = this->end();
for (auto displayListItem : *this) {
+ if (!displayListItem)
+ break;
auto item = displayListItem->item;
ASSERT(item);
if (!item)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes