[Webkit-unassigned] [Bug 49468] [Qt] Assertion failure in DocumentLoader::commitData when loading a media document

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 15 14:27:58 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=49468





--- Comment #1 from Joe Wild <joseph.wild at nokia.com>  2011-04-15 14:27:59 PST ---
Created an attachment (id=89853)
 --> (https://bugs.webkit.org/attachment.cgi?id=89853&action=review)
Proposed patch for handling Audio as top level content

I did not check the review flag yet since I am in the process adding a test 
and generating Mac results. Will resubmit when that's ready.  

There a number of directions to go with this, so any feedback would be appreciated.

So what it looks like is happening.  When you select a link (<a>) to the
audio/x-wav content at url: http://www.nch.com.au/acm/sample.wav, I think
the following is supposed to happen.

  Load of url is issued.
  Content coming back is handled in MediaDocumentParser
    (./WebCore/html/MediaDocument.cpp). The content comes back 
    to MediaDocumentParser::appendBytes. 
  appendBytes calls createDocumentStructure() to create an HTML wrapper
   around video element with the src attribute of the original url.
  Then the current load of the url is terminated/finish and the generated HTML
   should be processed to handle the audio/x-wav content.

What seems to be going wrong is that the 1st load of the url continues
(not completely terminated), and that causes problems.

My best guess at a fix is just to cancel the 1st load:

  void MediaDocumentParser::createDocumentStructure()
  {
  ...
      frame->loader()->activeDocumentLoader()->mainResourceLoader()->setShouldBufferData(false);
  added ->  // Cancel the current load of url. Will handle inside the HTML video element created above.
  added ->  frame->loader()->activeDocumentLoader()->mainResourceLoader()->cancel();
  }

Another alternative would be to create the HTML skeleton earlier.
Canceling the 1st load seemed like the safest fix. It seems a little odd to me that
MediaDocumentParser::appendBytes is the function to create the HTML
wrapper skeleton.  I can see that is has been this way for a long
time.  Is there a reason we don't create the HTML wrapper when the
MediaDocumentParser is created?

Also, I'm not sure what the expected behavior should be.  At least,
it does not reset or assert with this fix, but the audio does not play in
QtTestBrowser on Linux.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list