Skip to content
  • commit-queue@webkit.org's avatar
    [BlackBerry] MMRPlayer will hang webkit thread when retrieving media metadata · c13a2cb4
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=80978
    
    Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-04-11
    Reviewed by Rob Buis.
    
    Source/WebCore:
    
    RIM PR: 143471
    Implemented the interface function onWaitMetadataNotified()
    which starts a timer to wait for the metadata retrieving to
    finish, and pops up a dialog to notify the user what to do
    if there still is no metadata when the timer fires.
    
    This patch also contributed by Max Feil <mfeil@rim.com>.
    Internally reviewed by Max Feil.
    
    Test: http/tests/media/video-throttled-load-metadata.html
    
    * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
    (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
    (WebCore):
    (WebCore::MediaPlayerPrivate::onWaitMetadataNotified):
    (WebCore::MediaPlayerPrivate::waitMetadataTimerFired):
    * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
    (MediaPlayerPrivate):
    
    LayoutTests:
    
    RIM PR: 143471
    Added a layout test which simulates a slow network, and starts a web worker
    thread to write a log message when retrieving media metadata to see if the
    webkit thread is blocked by media retrieving thread.
    
    * http/tests/media/video-throttled-load-metadata-expected.txt: Added.
    * http/tests/media/video-throttled-load-metadata-worker.js: Added.
    * http/tests/media/video-throttled-load-metadata.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c13a2cb4