[webkit-reviews] review denied: [Bug 35992] Crash at MediaPlayer::duration() : [Attachment 50463] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 11 08:12:23 PST 2010


Eric Carlson <eric.carlson at apple.com> has denied Hin-Chung Lam
<hclam at google.com>'s request for review:
Bug 35992: Crash at MediaPlayer::duration()
https://bugs.webkit.org/show_bug.cgi?id=35992

Attachment 50463: Patch
https://bugs.webkit.org/attachment.cgi?id=50463&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
>  float HTMLMediaElement::duration() const
>  {
> -    if (m_readyState >= HAVE_METADATA)
> +    if (m_player && m_readyState >= HAVE_METADATA)
>	   return m_player->duration();

While this is a sensible change, it shouldn't be necessary to prevent this
crash because m_readyState should be HAVE_NOTHING if m_player is NULL. I
haven't looked, but I suspect there are more problems waiting to be discovered
when the the player has been destroyed and the state hasn't been reset.Can you
please reset m_readyState and m_networkState to their default values when the
player is destroyed?


> Index: LayoutTests/http/tests/media/video-cancel-load.html

I would *really* like to see this test reformatted to have some structure (text
in the <body>, <script> in <head> etc). I know that many layout tests do not do
this, but I find that it is often much easier to understand what a test is
supposed to do if has some structure.


More information about the webkit-reviews mailing list