Changeset 171148 in webkit


Ignore:
Timestamp:
Jul 16, 2014 11:05:09 AM (10 years ago)
Author:
jer.noble@apple.com
Message:

[MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
https://bugs.webkit.org/show_bug.cgi?id=134941

Reviewed by Eric Carlson.

Source/WebCore:
Only do our modified-order change of the readyState if the error parameter is empty,
as that's the only case where a duration change will cause an inadvertant readyState
change.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::streamEndedWithError):

LayoutTests:
Update media/media-source/media-source-end-of-stream.html to use an empty parameter, rather
than an empty string parameter, to endOfStream().

  • media/media-source/media-source-end-of-stream-expected.txt:
  • media/media-source/media-source-end-of-stream.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r171143 r171148  
     12014-07-16  Jer Noble  <jer.noble@apple.com>
     2
     3        [MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
     4        https://bugs.webkit.org/show_bug.cgi?id=134941
     5
     6        Reviewed by Eric Carlson.
     7
     8        Update media/media-source/media-source-end-of-stream.html to use an empty parameter, rather
     9        than an empty string parameter, to endOfStream().
     10
     11        * media/media-source/media-source-end-of-stream-expected.txt:
     12        * media/media-source/media-source-end-of-stream.html:
     13
    1142014-07-16  Jinwoo Song  <jinwoo7.song@samsung.com>
    215
  • trunk/LayoutTests/media/media-source/media-source-end-of-stream-expected.txt

    r160282 r171148  
    3131RUN(sourceBuffer.appendBuffer(initSegment))
    3232EVENT(updateend)
    33 RUN(source.endOfStream(""))
     33RUN(source.endOfStream())
    3434EVENT(suspend)
    3535EXPECTED (video.networkState == '1') OK
  • trunk/LayoutTests/media/media-source/media-source-end-of-stream.html

    r160282 r171148  
    9696    function updateEnd5() {
    9797        waitForEventOnce('suspend', videoSuspend5);
    98         run('source.endOfStream("")');
     98        run('source.endOfStream()');
    9999    }
    100100
  • trunk/Source/WebCore/ChangeLog

    r171147 r171148  
     12014-07-16  Jer Noble  <jer.noble@apple.com>
     2
     3        [MSE] REGRESSION(r171033): ASSERT in WebCore::MediaSource::onReadyStateChange()
     4        https://bugs.webkit.org/show_bug.cgi?id=134941
     5
     6        Reviewed by Eric Carlson.
     7
     8        Only do our modified-order change of the readyState if the error parameter is empty,
     9        as that's the only case where a duration change will cause an inadvertant readyState
     10        change.
     11
     12        * Modules/mediasource/MediaSource.cpp:
     13        (WebCore::MediaSource::streamEndedWithError):
     14
    1152014-07-16  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp

    r171033 r171148  
    454454        // 2. Notify the media element that it now has all of the media data.
    455455        m_private->markEndOfStream(MediaSourcePrivate::EosNoError);
    456     } else if (error == network) {
     456    }
     457
     458    // NOTE: Do steps 1 & 2 after step 3 (with an empty error) to avoid the MediaSource's readyState being re-opened by a
     459    // remove() operation resulting from a duration change.
     460    // FIXME: Re-number or update this section once <https://www.w3.org/Bugs/Public/show_bug.cgi?id=26316> is resolved.
     461    // 1. Change the readyState attribute value to "ended".
     462    // 2. Queue a task to fire a simple event named sourceended at the MediaSource.
     463    setReadyState(endedKeyword());
     464
     465    if (error == network) {
    457466        // ↳ If error is set to "network"
    458467        ASSERT(m_mediaElement);
     
    485494            m_mediaElement->mediaLoadingFailedFatally(MediaPlayer::DecodeError);
    486495        }
    487     } else {
     496    } else if (!error.isEmpty()) {
    488497        // ↳ Otherwise
    489498        //   Throw an INVALID_ACCESS_ERR exception.
    490499        ec = INVALID_ACCESS_ERR;
    491500    }
    492 
    493     // NOTE: Do steps 1 & 2 after step 3 to avoid the MediaSource's readyState being re-opened by a
    494     // remove() operation resulting from a duration change.
    495     // FIXME: Re-number or update this section once <https://www.w3.org/Bugs/Public/show_bug.cgi?id=26316> is resolved.
    496     // 1. Change the readyState attribute value to "ended".
    497     // 2. Queue a task to fire a simple event named sourceended at the MediaSource.
    498     setReadyState(endedKeyword());
    499501}
    500502
Note: See TracChangeset for help on using the changeset viewer.