Changeset 247266 in webkit


Ignore:
Timestamp:
Jul 9, 2019 11:55:43 AM (5 years ago)
Author:
achristensen@apple.com
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r247262 r247266  
     12019-07-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        Null check HistoryItems given to loadDifferentDocumentItem
     4        https://bugs.webkit.org/show_bug.cgi?id=199596
     5        <rdar://problem/49884391>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        * loader/FrameLoader.cpp:
     10        (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
     11        Under some rare and mysterious conditions we can have a null provisionalItem when loading from the cache.
     12
    1132019-07-09  Zalan Bujtas  <zalan@apple.com>
    214
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r247025 r247266  
    38693869
    38703870    FrameLoadType loadType = m_loadType;
    3871     HistoryItem& item = *history().provisionalItem();
     3871    HistoryItem* item = history().provisionalItem();
    38723872
    38733873    stopAllLoaders(ShouldNotClearProvisionalItem);
    3874     loadDifferentDocumentItem(item, history().currentItem(), loadType, MayNotAttemptCacheOnlyLoadForFormSubmissionItem, ShouldTreatAsContinuingLoad::No);
     3874    if (item)
     3875        loadDifferentDocumentItem(*item, history().currentItem(), loadType, MayNotAttemptCacheOnlyLoadForFormSubmissionItem, ShouldTreatAsContinuingLoad::No);
     3876    else {
     3877        ASSERT_NOT_REACHED();
     3878        RELEASE_LOG_ERROR(ResourceLoading, "Retrying load after failed cache-only main resource load failed because there is no provisional history item.");
     3879    }
    38753880}
    38763881
Note: See TracChangeset for help on using the changeset viewer.