Changeset 186485 in webkit


Ignore:
Timestamp:
Jul 7, 2015, 4:54:11 PM (10 years ago)
Author:
timothy_horton@apple.com
Message:

Occasional null deref in the CA callback in flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=146700
<rdar://problem/21668754>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Make sure we keep the WebPage alive, and null-check the potentially null
WebCore objects (Page and Frame).

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r186484 r186485  
     12015-07-07  Tim Horton  <timothy_horton@apple.com>
     2
     3        Occasional null deref in the CA callback in flushLayers()
     4        https://bugs.webkit.org/show_bug.cgi?id=146700
     5        <rdar://problem/21668754>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
     10        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
     11        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
     12        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
     13        Make sure we keep the WebPage alive, and null-check the potentially null
     14        WebCore objects (Page and Frame).
     15
    1162015-07-06  Matt Rajca  <mrajca@apple.com>
    217
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm

    r186155 r186485  
    363363
    364364#if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
    365     [CATransaction addCommitHandler:^{
    366         m_webPage.corePage()->inspectorController().didComposite(m_webPage.mainFrameView()->frame());
     365    RefPtr<WebPage> retainedPage = &m_webPage;
     366    [CATransaction addCommitHandler:[retainedPage] {
     367        if (Page* corePage = retainedPage->corePage()) {
     368            if (Frame* coreFrame = retainedPage->mainFrame())
     369                corePage->inspectorController().didComposite(*coreFrame);
     370        }
    367371    } forPhase:kCATransactionPhasePostCommit];
    368372#endif
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

    r186173 r186485  
    392392
    393393#if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
    394         [CATransaction addCommitHandler:^{
    395             m_webPage.corePage()->inspectorController().didComposite(m_webPage.mainFrameView()->frame());
     394        RefPtr<WebPage> retainedPage = &m_webPage;
     395        [CATransaction addCommitHandler:[retainedPage] {
     396            if (Page* corePage = retainedPage->corePage()) {
     397                if (Frame* coreFrame = retainedPage->mainFrame())
     398                    corePage->inspectorController().didComposite(*coreFrame);
     399            }
    396400        } forPhase:kCATransactionPhasePostCommit];
    397401#endif
Note: See TracChangeset for help on using the changeset viewer.