Changeset 172828 in webkit


Ignore:
Timestamp:
Aug 21, 2014 3:51:03 AM (10 years ago)
Author:
vjaquez@igalia.com
Message:

[GTK] WebkitWebProcess crashing navigating away from ogg video element
https://bugs.webkit.org/show_bug.cgi?id=135348

Reviewed by Philippe Normand.

Source/WebCore:

Let GraphicsLayerTextureMapper know it needs to detach the platform
layer when a MediaPlayerPrivateGStreamerBase is destroyed.

No new test since media/restore-from-page-cache.html covers it.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):

Source/WebKit2:

When a page is cached, by default doesn't recreate the backing store
(an optimization added in r89316).

Not all the ports uses that optimization. For example IOS port doesn't
use it (r161185).

In the case of the GTK port, the MediaPlayerPrivateGStreamer, not only
processes video buffers, also display them, because it is a
TextureMapperPlatformLayer too.

Nevertheless, in r153937, when a page is cached, the player is
destroyed. But our player has a backing store and the render tree
doesn't know that the player has gone. Hence, when the page is redraw,
the TextureMapper tree visits the video element, which doesn't exist
anymore, a segmentation fault occurs.

So, as our media player renders, and as we cannot trust that the
player exists when a page is painted, we cannot rely in the r89316
optimization.

Disabling the backing stores optimization fixes the problem.

Covered by existing tests.

  • WebProcess/soup/WebProcessSoup.cpp:

(WebKit::WebProcess::platformSetCacheModel): Enable the backing store
clearing when page caching for GTK.

LayoutTests:

  • platform/gtk/TestExpectations: Enable

media/restore-from-page-cache.html,
plugins/netscape-plugin-page-cache-works.html and
animations/resume-after-page-cache.html. They should pass correctly.
Skip compositing/iframes/page-cache-layer-tree.html since we disable
that optimization.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r172827 r172828  
     12014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
     2
     3        [GTK] WebkitWebProcess crashing navigating away from ogg video element
     4        https://bugs.webkit.org/show_bug.cgi?id=135348
     5
     6        Reviewed by Philippe Normand.
     7
     8        * platform/gtk/TestExpectations: Enable
     9        media/restore-from-page-cache.html,
     10        plugins/netscape-plugin-page-cache-works.html and
     11        animations/resume-after-page-cache.html. They should pass correctly.
     12        Skip compositing/iframes/page-cache-layer-tree.html since we disable
     13        that optimization.
     14
    1152014-08-21  Shivakumar JM  <shiva.jm@samsung.com>
    216
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r172750 r172828  
    581581webkit.org/b/89650 svg/W3C-SVG-1.1/struct-dom-06-b.svg [ Failure Pass ]
    582582
    583 webkit.org/b/80158 plugins/netscape-plugin-page-cache-works.html [ Failure Pass ]
    584 
    585583webkit.org/b/89811 media/media-blocked-by-beforeload.html [ Failure Pass ]
    586584webkit.org/b/84856 media/media-controller-playback.html [ Crash Failure Timeout Pass ]
     
    678676
    679677webkit.org/b/119041 css3/calc/img-size.html [ ImageOnlyFailure Pass ]
    680 
    681 webkit.org/b/119042 animations/resume-after-page-cache.html [ Failure Pass Crash ]
    682678
    683679# These tests started to time out (or time out more often) since the FTL merge
     
    20072003webkit.org/b/132126 media/track/track-cues-enter-exit.html [ Timeout Pass ]
    20082004webkit.org/b/132126 media/video-poster-background.html [ ImageOnlyFailure ]
    2009 webkit.org/b/132126 media/restore-from-page-cache.html [ Crash ]
    20102005
    20112006webkit.org/b/132233 fast/regions/clip-to-padding-box-vertical-lr.html [ ImageOnlyFailure ]
     
    20952090webkit.org/b/132421 fast/multicol/fixed-stack.html [ Pass ]
    20962091
     2092# The backing store is cleared when page cached in GTK
     2093webkit.org/b/135348 compositing/iframes/page-cache-layer-tree.html [ Skip ]
     2094
    20972095#////////////////////////////////////////////////////////////////////////////////////////
    20982096# End of Tests failing
  • trunk/Source/WebCore/ChangeLog

    r172826 r172828  
     12014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
     2
     3        [GTK] WebkitWebProcess crashing navigating away from ogg video element
     4        https://bugs.webkit.org/show_bug.cgi?id=135348
     5
     6        Reviewed by Philippe Normand.
     7
     8        Let GraphicsLayerTextureMapper know it needs to detach the platform
     9        layer when a MediaPlayerPrivateGStreamerBase is destroyed.
     10
     11        No new test since media/restore-from-page-cache.html covers it.
     12
     13        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
     14        (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
     15
    1162014-08-20  Benjamin Poulain  <benjamin@webkit.org>
    217
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp

    r172441 r172828  
    122122        m_muteSignalHandler = 0;
    123123    }
     124
     125#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS)
     126    if (client())
     127        client()->platformLayerWillBeDestroyed();
     128#endif
    124129}
    125130
  • trunk/Source/WebKit2/ChangeLog

    r172814 r172828  
     12014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
     2
     3        [GTK] WebkitWebProcess crashing navigating away from ogg video element
     4        https://bugs.webkit.org/show_bug.cgi?id=135348
     5
     6        Reviewed by Philippe Normand.
     7
     8        When a page is cached, by default doesn't recreate the backing store
     9        (an optimization added in r89316).
     10
     11        Not all the ports uses that optimization. For example IOS port doesn't
     12        use it (r161185).
     13
     14        In the case of the GTK port, the MediaPlayerPrivateGStreamer, not only
     15        processes video buffers, also display them, because it is a
     16        TextureMapperPlatformLayer too.
     17
     18        Nevertheless, in r153937, when a page is cached, the player is
     19        destroyed. But our player has a backing store and the render tree
     20        doesn't know that the player has gone. Hence, when the page is redraw,
     21        the TextureMapper tree visits the video element, which doesn't exist
     22        anymore, a segmentation fault occurs.
     23
     24        So, as our media player renders, and as we cannot trust that the
     25        player exists when a page is painted, we cannot rely in the r89316
     26        optimization.
     27
     28        Disabling the backing stores optimization fixes the problem.
     29
     30        Covered by existing tests.
     31
     32        * WebProcess/soup/WebProcessSoup.cpp:
     33        (WebKit::WebProcess::platformSetCacheModel): Enable the backing store
     34        clearing when page caching for GTK.
     35
    1362014-08-20  Alex Christensen  <achristensen@webkit.org>
    237
  • trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp

    r172725 r172828  
    111111    WebCore::pageCache()->setCapacity(pageCacheCapacity);
    112112
     113#if PLATFORM(GTK)
     114    WebCore::pageCache()->setShouldClearBackingStores(true);
     115#endif
     116
    113117    if (!usesNetworkProcess()) {
    114118        if (urlCacheDiskCapacity > soup_cache_get_max_size(cache))
Note: See TracChangeset for help on using the changeset viewer.