Title: [290994] trunk/Source/WebCore
Revision
290994
Author
[email protected]
Date
2022-03-08 08:56:07 -0800 (Tue, 08 Mar 2022)

Log Message

REGRESSION (r290853): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::clear
https://bugs.webkit.org/show_bug.cgi?id=237565
<rdar://problem/88356074>

Reviewed by Chris Dumez.

No new tests. Fixes crashing test: accessibility/mac/value-change/value-change-user-info-textarea.html

newDocument may be the frame's document. We should make it a RefPtr
because it could get set to null in this function.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::clear):
* loader/FrameLoader.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (290993 => 290994)


--- trunk/Source/WebCore/ChangeLog	2022-03-08 16:42:32 UTC (rev 290993)
+++ trunk/Source/WebCore/ChangeLog	2022-03-08 16:56:07 UTC (rev 290994)
@@ -1,3 +1,20 @@
+2022-03-08  Kate Cheney  <[email protected]>
+
+        REGRESSION (r290853): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::clear
+        https://bugs.webkit.org/show_bug.cgi?id=237565
+        <rdar://problem/88356074>
+
+        Reviewed by Chris Dumez.
+
+        No new tests. Fixes crashing test: accessibility/mac/value-change/value-change-user-info-textarea.html 
+
+        newDocument may be the frame's document. We should make it a RefPtr
+        because it could get set to null in this function.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::clear):
+        * loader/FrameLoader.h:
+
 2022-03-08  Michael Catanzaro  <[email protected]>
 
         [GTK] Sync gtk-overlay-scrolling setting to web process

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (290993 => 290994)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2022-03-08 16:42:32 UTC (rev 290993)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2022-03-08 16:56:07 UTC (rev 290994)
@@ -620,7 +620,7 @@
     return !newDocument.securityOrigin().isSameOriginAs(frame.document()->securityOrigin());
 }
 
-void FrameLoader::clear(Document* newDocument, bool clearWindowProperties, bool clearScriptObjects, bool clearFrameView, Function<void()>&& handleDOMWindowCreation)
+void FrameLoader::clear(RefPtr<Document>&& newDocument, bool clearWindowProperties, bool clearScriptObjects, bool clearFrameView, Function<void()>&& handleDOMWindowCreation)
 {
     bool neededClear = m_needsClear;
     m_needsClear = false;

Modified: trunk/Source/WebCore/loader/FrameLoader.h (290993 => 290994)


--- trunk/Source/WebCore/loader/FrameLoader.h	2022-03-08 16:42:32 UTC (rev 290993)
+++ trunk/Source/WebCore/loader/FrameLoader.h	2022-03-08 16:56:07 UTC (rev 290994)
@@ -152,7 +152,7 @@
     void stopLoading(UnloadEventPolicy);
     void closeURL();
     // FIXME: clear() is trying to do too many things. We should break it down into smaller functions (ideally with fewer raw Boolean parameters).
-    void clear(Document* newDocument, bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true, Function<void()>&& handleDOMWindowCreation = nullptr);
+    void clear(RefPtr<Document>&& newDocument, bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true, Function<void()>&& handleDOMWindowCreation = nullptr);
 
     bool isLoading() const;
     WEBCORE_EXPORT bool frameHasLoaded() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to