Bug 25427 - Fix a bug in MediaDocument.cpp that gets triggered when entering a media file in address bar
Summary: Fix a bug in MediaDocument.cpp that gets triggered when entering a media file...
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
: 25429 (view as bug list)
Depends on:
Reported: 2009-04-27 10:58 PDT by Hin-Chung Lam
Modified: 2009-09-08 11:03 PDT (History)
2 users (show)

See Also:

change log + patch (1.07 KB, patch)
2009-04-28 19:16 PDT, Hin-Chung Lam
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hin-Chung Lam 2009-04-27 10:58:18 PDT
When MediaDocument receives the first call for data for the media document, it immediately construct the DOM structure and mark the parsing as finished but does not stop the resource loading of the media file, so when the next buffer is received a ASSERT is hit.
Comment 1 Mark Rowe (bdash) 2009-04-27 13:39:57 PDT
*** Bug 25429 has been marked as a duplicate of this bug. ***
Comment 2 Hin-Chung Lam 2009-04-28 19:16:51 PDT
Created attachment 29876 [details]
change log + patch

Another bug I filed was a duplicate so I submit the patch again here. I'm not so sure if there's any layout tests regarding MediaDocument and MediaTokenizer, please correct me if I need to have layout tests for this fix.
Comment 3 Eric Carlson 2009-04-29 08:38:46 PDT
Is there a way to reproduce this problem?
Comment 4 Hin-Chung Lam 2009-04-29 14:13:26 PDT
The steps I took:
1. Open Chromium nightly build
2. Enter a .mov address in the address bar
3. kaboom!

I tried to reproduce it in Safari (or nightly WebKit) but no luck, I tried:
1. Remove all QuickTime plugins so it won't get delegated to QT
2. Enter a .mov address
3. Explorer opens and pointed me to the file
Comment 5 Eric Carlson 2009-05-01 17:25:19 PDT
This patch causes an OSX build to crash in DocumentLoader::cancelMainResourceLoad, called from -[WebHTMLRepresentation receivedData:withDataSource:] to stop resource loading. Brady Eidson added that call in http://trac.webkit.org/changeset/36001 to replace code that was essentially the same as what you are proposing here, so I don't think this approach is right.
Comment 6 Hin-Chung Lam 2009-05-01 17:44:59 PDT
I'll do a OSX build to verify and debug into it, thanks for the info!
Comment 7 Eric Seidel (no email) 2009-05-14 22:21:05 PDT
Comment on attachment 29876 [details]
change log + patch

Style violations { don't go on their own line for if's.

also, why is this correct?  does this match other Document.cpp finish() methods?  Seems it needs a comment to that effect.
Comment 8 Eric Seidel (no email) 2009-05-14 22:21:37 PDT
Comment on attachment 29876 [details]
change log + patch

Also, we could at least make a manual test (see WebCore/manual-tests/) for this.