⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 178426 in webkit


Ignore:
Timestamp:
Jan 14, 2015, 10:43:05 AM (12 years ago)
Author:
jer.noble@apple.com
Message:

Null-deref crash when seeking immediately before looping.
https://bugs.webkit.org/show_bug.cgi?id=140394

Reviewed by Eric Carlson.

Source/WebCore:

It is possible for finishSeek() to be called when a seek() has caused a pending seek task
to be scheduled, but before that pending seek task is run. In this case, if a seek request
is issued, the existing pending seek task will not be cancelled, which will cause a crash
when the pending seek task is run.

When checking whether an existing seek task needs to be cancelled, check the actual timer,
rather than the m_seeking boolean, so that this case is covered.

Test: media/video-ended-seek-crash.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::seekWithTolerance):

LayoutTests:

  • media/video-ended-seek-crash-expected.txt: Added.
  • media/video-ended-seek-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r178422 r178426  
     12015-01-14  Jer Noble  <jer.noble@apple.com>
     2
     3        Null-deref crash when seeking immediately before looping.
     4        https://bugs.webkit.org/show_bug.cgi?id=140394
     5
     6        Reviewed by Eric Carlson.
     7
     8        * media/video-ended-seek-crash-expected.txt: Added.
     9        * media/video-ended-seek-crash.html: Added.
     10
    1112015-01-14  Brent Fulgham  <bfulgham@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r178424 r178426  
     12015-01-14  Jer Noble  <jer.noble@apple.com>
     2
     3        Null-deref crash when seeking immediately before looping.
     4        https://bugs.webkit.org/show_bug.cgi?id=140394
     5
     6        Reviewed by Eric Carlson.
     7
     8        It is possible for finishSeek() to be called when a seek() has caused a pending seek task
     9        to be scheduled, but before that pending seek task is run. In this case, if a seek request
     10        is issued, the existing pending seek task will not be cancelled, which will cause a crash
     11        when the pending seek task is run.
     12
     13        When checking whether an existing seek task needs to be cancelled, check the actual timer,
     14        rather than the m_seeking boolean, so that this case is covered.
     15
     16        Test: media/video-ended-seek-crash.html
     17
     18        * html/HTMLMediaElement.cpp:
     19        (WebCore::HTMLMediaElement::seekWithTolerance):
     20
    1212015-01-14  Brent Fulgham  <bfulgham@apple.com>
    222
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r178367 r178426  
    23502350    // already running. Abort that other instance of the algorithm without waiting for the step that
    23512351    // it is running to complete.
    2352     if (m_seeking) {
     2352    if (m_seekTimer.isActive()) {
    23532353        m_seekTimer.stop();
    23542354        m_pendingSeek = nullptr;
Note: See TracChangeset for help on using the changeset viewer.