Skip to content
  • timothy_horton@apple.com's avatar
    REGRESSION (r138858): Crash in WebCore::FrameLoader::~FrameLoader() when... · e39867bb
    timothy_horton@apple.com authored
    REGRESSION (r138858): Crash in WebCore::FrameLoader::~FrameLoader() when opening page in a background tab
    https://bugs.webkit.org/show_bug.cgi?id=109935
    <rdar://problem/13225963>
    
    Reviewed by Brady Eidson.
    
    Previously, we were deciding if a Page could go into
    the PageCache by blacklisting certain load types. Instead,
    whitelist the load types that we know can go into the cache,
    so that newly-added load types are not cached unless
    that is explicitly desired.
    
    The crash occurs when a page which is actively loading
    is put into the page cache while doing a redirect with
    FrameLoadTypeRedirectWithLockedBackForwardList (note that
    this is a redirect that was not covered in the blacklist),
    and then promptly removed from the page cache, resulting
    in resources from the redirect target (the now-active page)
    being incorrectly destroyed.
    
    No new tests, only known crash repro case is extremely
    timing dependent (and only happens in WebKit2, with tiled
    drawing, in background tabs).
    
    * history/PageCache.cpp:
    (WebCore::PageCache::canCache):
    
    Adjust a test which depended on slow-redirects going
    into the page cache (which will no longer happen)
    to instead click on a link.
    
    * fast/history/timed-refresh-in-cached-frame.html:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e39867bb