Skip to content
  • changseok.oh@collabora.com's avatar
    [WK2] Assertion failure in WebCore::Page::checkSubframeCountConsistency when going back · 604ceb16
    changseok.oh@collabora.com authored
    https://bugs.webkit.org/show_bug.cgi?id=119781
    
    Reviewed by Alexey Proskuryakov.
    
    Source/WebCore:
    
    We should pair restoring a cached frame and adding it to FrameTree so that
    actual added frame count in FrameTree keeps same with restored frame count.
    Otherwise assert failure occurs in Page::CheckSubframeCountConsistency.
    We have added cached frames to FrameTree ahead and then restored them by tree travelsal.
    But this way doesn't guarantee subframecount of Page and the number of child of FrameTree are equal.
    In addition, we still make sure that adding a cached frame to FrameTree should happen
    before opening it. Because FrameTree might be used while restoring a cached page.
    
    Test: fast/history/go-back-to-iframe-with-plugin.html
    
    * history/CachedFrame.cpp:
    (WebCore::CachedFrameBase::restore):
    (WebCore::CachedFrame::open):
    
    LayoutTests:
    
    To verify this fix, we need to use the CachedPage in WK2 debug mode.
    And the test page should have at least one iframe with plugin.
    
    * fast/history/go-back-to-iframe-with-plugin-expected.txt: Added.
    * fast/history/go-back-to-iframe-with-plugin.html: Added.
    * fast/history/resources/subframe-with-plugin.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    604ceb16