Title: [264195] trunk/Source/WebKitLegacy/mac
Revision
264195
Author
bb...@apple.com
Date
2020-07-09 14:20:24 -0700 (Thu, 09 Jul 2020)

Log Message

REGRESSION(r217248): ASSERT_NOT_REACHED() in toWebFrameLoadType()
https://bugs.webkit.org/show_bug.cgi?id=214149

Reviewed by Joseph Pecoraro.

ASSERT_NOT_REACHED() is hit when the type is FrameLoadType::ReloadExpiredOnly. This happens
when remote inspection triggers a reload via InspectorPageAgent::reload() and the
'revalidateAllResources' optional argument is false or not specified.

* WebView/WebFrame.mm:
(toWebFrameLoadType):
Remove the assert and add a note explaining why this load type that does not
naturally occur in WK1 may nonetheless be triggered while remote inspecting.

Modified Paths

Diff

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (264194 => 264195)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2020-07-09 20:59:55 UTC (rev 264194)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2020-07-09 21:20:24 UTC (rev 264195)
@@ -1,3 +1,19 @@
+2020-07-09  Brian Burg  <bb...@apple.com>
+
+        REGRESSION(r217248): ASSERT_NOT_REACHED() in toWebFrameLoadType()
+        https://bugs.webkit.org/show_bug.cgi?id=214149
+
+        Reviewed by Joseph Pecoraro.
+
+        ASSERT_NOT_REACHED() is hit when the type is FrameLoadType::ReloadExpiredOnly. This happens
+        when remote inspection triggers a reload via InspectorPageAgent::reload() and the
+        'revalidateAllResources' optional argument is false or not specified.
+
+        * WebView/WebFrame.mm:
+        (toWebFrameLoadType):
+        Remove the assert and add a note explaining why this load type that does not
+        naturally occur in WK1 may nonetheless be triggered while remote inspecting.
+
 2020-07-06  Simon Fraser  <simon.fra...@apple.com>
 
         BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS should not have trailing semicolons

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm (264194 => 264195)


--- trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm	2020-07-09 20:59:55 UTC (rev 264194)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm	2020-07-09 21:20:24 UTC (rev 264195)
@@ -1067,10 +1067,10 @@
     case FrameLoadType::Replace:
         return WebFrameLoadTypeReplace;
     case FrameLoadType::ReloadFromOrigin:
+    case FrameLoadType::ReloadExpiredOnly:
+        // NOTE: reloading via remote inspection may trigger ReloadExpiredOnly, but otherwise
+        // it is not a supported load type as it was added after WebKit1 became WebKitLegacy.
         return WebFrameLoadTypeReloadFromOrigin;
-    case FrameLoadType::ReloadExpiredOnly:
-        ASSERT_NOT_REACHED();
-        return WebFrameLoadTypeReload;
     }
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to