Changeset 166372 in webkit


Ignore:
Timestamp:
Mar 27, 2014 3:28:02 PM (10 years ago)
Author:
Simon Fraser
Message:

Fix crash when RenderView is cleared inside of frame flattening layout
https://bugs.webkit.org/show_bug.cgi?id=130864

Reviewed by Dan Bernstein.

Navigating on http://wallstcheatsheet.com pages on iOS in WebKit1 would
sometimes crash when, inside the inChildFrameLayoutWithFrameFlattening clause,
our frame's RenderView would be null after doing a layout from the root frame,
possibly also when WebCore was being re-entered from another thread.

Add a null check to fix this.

Crash was timing-dependent and hard to test.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r166369 r166372  
     12014-03-27  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix crash when RenderView is cleared inside of frame flattening layout
     4        https://bugs.webkit.org/show_bug.cgi?id=130864
     5
     6        Reviewed by Dan Bernstein.
     7       
     8        Navigating on http://wallstcheatsheet.com pages on iOS in WebKit1 would
     9        sometimes crash when, inside the inChildFrameLayoutWithFrameFlattening clause,
     10        our frame's RenderView would be null after doing a layout from the root frame,
     11        possibly also when WebCore was being re-entered from another thread.
     12       
     13        Add a null check to fix this.
     14       
     15        Crash was timing-dependent and hard to test.
     16
     17        * page/FrameView.cpp:
     18        (WebCore::FrameView::layout):
     19
    1202014-03-27  Antti Koivisto  <antti@apple.com>
    221
  • trunk/Source/WebCore/page/FrameView.cpp

    r166117 r166372  
    10811081        startLayoutAtMainFrameViewIfNeeded(allowSubtree);
    10821082        RenderElement* root = m_layoutRoot ? m_layoutRoot : frame().document()->renderView();
    1083         if (!root->needsLayout())
     1083        if (!root || !root->needsLayout())
    10841084            return;
    10851085    }
Note: See TracChangeset for help on using the changeset viewer.