Title: [288286] releases/WebKitGTK/webkit-2.34
- Revision
- 288286
- Author
- [email protected]
- Date
- 2022-01-20 07:39:21 -0800 (Thu, 20 Jan 2022)
Log Message
Merge r287354 - null ptr deref in DocumentTimeline::animate
https://bugs.webkit.org/show_bug.cgi?id=234260
Patch by Frédéric Wang <[email protected]> on 2021-12-22
Reviewed by Darin Adler.
Source/WebCore:
Test: webanimations/document-timeline-animate-crash.html
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::animate): If the WeakPtr m_document was destroyed, throw a
TypeError exception so that the call to WebAnimation::create won't cause a null ptr deref.
LayoutTests:
Add non-regression test.
* webanimations/document-timeline-animate-crash-expected.txt: Added.
* webanimations/document-timeline-animate-crash.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.34/LayoutTests/ChangeLog (288285 => 288286)
--- releases/WebKitGTK/webkit-2.34/LayoutTests/ChangeLog 2022-01-20 15:39:13 UTC (rev 288285)
+++ releases/WebKitGTK/webkit-2.34/LayoutTests/ChangeLog 2022-01-20 15:39:21 UTC (rev 288286)
@@ -1,3 +1,15 @@
+2021-12-22 Frédéric Wang <[email protected]>
+
+ null ptr deref in DocumentTimeline::animate
+ https://bugs.webkit.org/show_bug.cgi?id=234260
+
+ Reviewed by Darin Adler.
+
+ Add non-regression test.
+
+ * webanimations/document-timeline-animate-crash-expected.txt: Added.
+ * webanimations/document-timeline-animate-crash.html: Added.
+
2021-12-17 Gabriel Nava Marino <[email protected]>
null ptr deref in WebCore::findPlaceForCounter
Added: releases/WebKitGTK/webkit-2.34/LayoutTests/webanimations/document-timeline-animate-crash-expected.txt (0 => 288286)
--- releases/WebKitGTK/webkit-2.34/LayoutTests/webanimations/document-timeline-animate-crash-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.34/LayoutTests/webanimations/document-timeline-animate-crash-expected.txt 2022-01-20 15:39:21 UTC (rev 288286)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: This test PASS if it does not CRASH.
+
Added: releases/WebKitGTK/webkit-2.34/LayoutTests/webanimations/document-timeline-animate-crash.html (0 => 288286)
--- releases/WebKitGTK/webkit-2.34/LayoutTests/webanimations/document-timeline-animate-crash.html (rev 0)
+++ releases/WebKitGTK/webkit-2.34/LayoutTests/webanimations/document-timeline-animate-crash.html 2022-01-20 15:39:21 UTC (rev 288286)
@@ -0,0 +1,16 @@
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ console.log('This test PASS if it does not CRASH.')
+ _onload_ = async () => {
+ for (let i = 0; i < 100; i++) {
+ let documentTimeline = new DocumentTimeline();
+ await caches.has('a');
+ try {
+ documentTimeline.animate(() => {});
+ } catch(e) {
+ // Catch flaky exception, so that it does not show up in dumped text.
+ }
+ }
+ };
+</script>
Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog (288285 => 288286)
--- releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog 2022-01-20 15:39:13 UTC (rev 288285)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog 2022-01-20 15:39:21 UTC (rev 288286)
@@ -1,3 +1,16 @@
+2021-12-22 Frédéric Wang <[email protected]>
+
+ null ptr deref in DocumentTimeline::animate
+ https://bugs.webkit.org/show_bug.cgi?id=234260
+
+ Reviewed by Darin Adler.
+
+ Test: webanimations/document-timeline-animate-crash.html
+
+ * animation/DocumentTimeline.cpp:
+ (WebCore::DocumentTimeline::animate): If the WeakPtr m_document was destroyed, throw a
+ TypeError exception so that the call to WebAnimation::create won't cause a null ptr deref.
+
2021-12-17 Gabriel Nava Marino <[email protected]>
null ptr deref in WebCore::findPlaceForCounter
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes