Title: [181804] trunk/Source/WebCore
Revision
181804
Author
cdu...@apple.com
Date
2015-03-20 10:18:52 -0700 (Fri, 20 Mar 2015)

Log Message

Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
https://bugs.webkit.org/show_bug.cgi?id=142911

Reviewed by Antti Koivisto.

Drop the isBackForwardLoadType(m_loadType) assertion in
FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
used to hold true when goToBackForwardItem() was only called with
history navigation load types. However, after r181782, we use a Standard
load in the cases where we do not wish to display stale content (e.g.
restoring session state).

The assertion comment says "We only use cache-only loads to avoid
resubmitting forms". However, we then call loadDifferentDocumentItem()
which already takes care of using the ReturnCacheDataElseLoad cache
policy as the HistoryItem has form data and we pass
MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.

No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
API test.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (181803 => 181804)


--- trunk/Source/WebCore/ChangeLog	2015-03-20 17:07:18 UTC (rev 181803)
+++ trunk/Source/WebCore/ChangeLog	2015-03-20 17:18:52 UTC (rev 181804)
@@ -1,3 +1,29 @@
+2015-03-20  Chris Dumez  <cdu...@apple.com>
+
+        Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
+        https://bugs.webkit.org/show_bug.cgi?id=142911
+
+        Reviewed by Antti Koivisto.
+
+        Drop the isBackForwardLoadType(m_loadType) assertion in
+        FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
+        used to hold true when goToBackForwardItem() was only called with
+        history navigation load types. However, after r181782, we use a Standard
+        load in the cases where we do not wish to display stale content (e.g.
+        restoring session state).
+
+        The assertion comment says "We only use cache-only loads to avoid
+        resubmitting forms". However, we then call loadDifferentDocumentItem()
+        which already takes care of using the ReturnCacheDataElseLoad cache
+        policy as the HistoryItem has form data and we pass
+        MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
+
+        No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
+        API test.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
+
 2015-03-20  Andy Estes  <aes...@apple.com>
 
         [Content Filtering] Adopt NEFilterSource unblock handling

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (181803 => 181804)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2015-03-20 17:07:18 UTC (rev 181803)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2015-03-20 17:18:52 UTC (rev 181804)
@@ -3254,8 +3254,6 @@
 {
     ASSERT(m_state == FrameStateProvisional);
     ASSERT(!m_loadingFromCachedPage);
-    // We only use cache-only loads to avoid resubmitting forms.
-    ASSERT(isBackForwardLoadType(m_loadType));
     ASSERT(history().provisionalItem());
     ASSERT(history().provisionalItem()->formData());
     ASSERT(history().provisionalItem() == m_requestedHistoryItem.get());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to