Title: [280899] releases/WebKitGTK/webkit-2.32/Source/WebCore
Revision
280899
Author
[email protected]
Date
2021-08-11 03:21:42 -0700 (Wed, 11 Aug 2021)

Log Message

Merge r274723 - Protect frame before calling didBeginDocument
https://bugs.webkit.org/show_bug.cgi?id=217185

Patch by Rob Buis <[email protected]> on 2021-03-19
Reviewed by Alex Christensen.

Protect frame before calling didBeginDocument
since it could potentially delete the frame
through event handling.

* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (280898 => 280899)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-08-11 10:21:04 UTC (rev 280898)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-08-11 10:21:42 UTC (rev 280899)
@@ -1,3 +1,17 @@
+2021-03-19  Rob Buis  <[email protected]>
+
+        Protect frame before calling didBeginDocument
+        https://bugs.webkit.org/show_bug.cgi?id=217185
+
+        Reviewed by Alex Christensen.
+
+        Protect frame before calling didBeginDocument
+        since it could potentially delete the frame
+        through event handling.
+
+        * loader/DocumentWriter.cpp:
+        (WebCore::DocumentWriter::begin):
+
 2021-03-18  Rob Buis  <[email protected]>
 
         Protect frame before calling setPrinting

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/loader/DocumentWriter.cpp (280898 => 280899)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/loader/DocumentWriter.cpp	2021-08-11 10:21:04 UTC (rev 280898)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/loader/DocumentWriter.cpp	2021-08-11 10:21:42 UTC (rev 280899)
@@ -192,6 +192,8 @@
         document->contentSecurityPolicy()->setInsecureNavigationRequestsToUpgrade(existingDocument->contentSecurityPolicy()->takeNavigationRequestsToUpgrade());
     }
 
+    auto protectedFrame = makeRef(*m_frame);
+
     m_frame->loader().didBeginDocument(dispatch);
 
     document->implicitOpen();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to