Title: [247266] trunk/Source/WebCore
- Revision
- 247266
- Author
- [email protected]
- Date
- 2019-07-09 11:55:43 -0700 (Tue, 09 Jul 2019)
Log Message
Null check HistoryItems given to loadDifferentDocumentItem
https://bugs.webkit.org/show_bug.cgi?id=199596
<rdar://problem/49884391>
Reviewed by Ryosuke Niwa.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
Under some rare and mysterious conditions we can have a null provisionalItem when loading from the cache.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (247265 => 247266)
--- trunk/Source/WebCore/ChangeLog 2019-07-09 18:43:57 UTC (rev 247265)
+++ trunk/Source/WebCore/ChangeLog 2019-07-09 18:55:43 UTC (rev 247266)
@@ -1,3 +1,15 @@
+2019-07-09 Alex Christensen <[email protected]>
+
+ Null check HistoryItems given to loadDifferentDocumentItem
+ https://bugs.webkit.org/show_bug.cgi?id=199596
+ <rdar://problem/49884391>
+
+ Reviewed by Ryosuke Niwa.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
+ Under some rare and mysterious conditions we can have a null provisionalItem when loading from the cache.
+
2019-07-09 Zalan Bujtas <[email protected]>
Fix LOG_DISABLED and TREE_DEBUGGING enabled build.
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (247265 => 247266)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2019-07-09 18:43:57 UTC (rev 247265)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2019-07-09 18:55:43 UTC (rev 247266)
@@ -3868,10 +3868,15 @@
ASSERT(history().provisionalItem() == m_requestedHistoryItem.get());
FrameLoadType loadType = m_loadType;
- HistoryItem& item = *history().provisionalItem();
+ HistoryItem* item = history().provisionalItem();
stopAllLoaders(ShouldNotClearProvisionalItem);
- loadDifferentDocumentItem(item, history().currentItem(), loadType, MayNotAttemptCacheOnlyLoadForFormSubmissionItem, ShouldTreatAsContinuingLoad::No);
+ if (item)
+ loadDifferentDocumentItem(*item, history().currentItem(), loadType, MayNotAttemptCacheOnlyLoadForFormSubmissionItem, ShouldTreatAsContinuingLoad::No);
+ else {
+ ASSERT_NOT_REACHED();
+ RELEASE_LOG_ERROR(ResourceLoading, "Retrying load after failed cache-only main resource load failed because there is no provisional history item.");
+ }
}
ResourceError FrameLoader::cancelledError(const ResourceRequest& request) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes