RESOLVED FIXED 65581
Crash in DocumentWriter::endIfNotLoadingMainResource
https://bugs.webkit.org/show_bug.cgi?id=65581
Summary Crash in DocumentWriter::endIfNotLoadingMainResource
Adam Barth
Reported 2011-08-02 16:42:44 PDT
Crash in DocumentWriter::endIfNotLoadingMainResource
Attachments
Patch (3.72 KB, patch)
2011-08-02 16:48 PDT, Adam Barth
no flags
Patch (3.58 KB, patch)
2011-08-02 17:36 PDT, Adam Barth
no flags
Patch for landing (4.13 KB, patch)
2011-08-03 10:58 PDT, Adam Barth
no flags
Adam Barth
Comment 1 2011-08-02 16:48:02 PDT
Darin Adler
Comment 2 2011-08-02 17:14:32 PDT
Comment on attachment 102714 [details] Patch Can you run that test case on a computer without Flash installed?
Adam Barth
Comment 3 2011-08-02 17:18:44 PDT
> Can you run that test case on a computer without Flash installed? Let me try with the test plugin.
Adam Barth
Comment 4 2011-08-02 17:36:27 PDT
Nate Chapin
Comment 5 2011-08-03 08:36:19 PDT
Comment on attachment 102721 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102721&action=review > Source/WebCore/ChangeLog:10 > + This function is poorly designed because isLoadingMainResource is a > + poor proxy for determing whether to flush/finish the parser. Really, > + we should how loads complete to match the model in HTML5, but that's Typo: I think you're missing a word, "we should change how loads..."? Also, FIXME in endIfNotLoadingMainResource to this effect? > LayoutTests/fast/loader/reload-zero-byte-plugin.html:16 > + }, 100); > +}, 100); Can we do this without setTimeout, or with shorter timeouts? 200ms isn't too bad, but I feel honor-bound to ask.
Adam Barth
Comment 6 2011-08-03 09:59:40 PDT
Comment on attachment 102721 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=102721&action=review >> LayoutTests/fast/loader/reload-zero-byte-plugin.html:16 >> +}, 100); > > Can we do this without setTimeout, or with shorter timeouts? 200ms isn't too bad, but I feel honor-bound to ask. The underlying problem is that opening content in a new window doesn't generate any sort of events. Normally we could load some HTML that sent use a postMessage, but in this case we need to load this empty plugin. It's possible we could teach the test plugin to send us a message on load...
Nate Chapin
Comment 7 2011-08-03 10:04:39 PDT
(In reply to comment #6) > (From update of attachment 102721 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=102721&action=review > > >> LayoutTests/fast/loader/reload-zero-byte-plugin.html:16 > >> +}, 100); > > > > Can we do this without setTimeout, or with shorter timeouts? 200ms isn't too bad, but I feel honor-bound to ask. > > The underlying problem is that opening content in a new window doesn't generate any sort of events. Normally we could load some HTML that sent use a postMessage, but in this case we need to load this empty plugin. It's possible we could teach the test plugin to send us a message on load... Eh, I won't ask you to do that. the test plugin has way too much bolted onto it already imo.
Alexey Proskuryakov
Comment 8 2011-08-03 10:42:34 PDT
When I run this test with r92135 on Mac, I don't get any crash, but get empty test results. That's surprising. run-webkit-tests fast/loader/reload-zero-byte-plugin.html --repeat 100
Alexey Proskuryakov
Comment 9 2011-08-03 10:46:58 PDT
> but get empty test results Strike that - I applied the patch incorrectly. But still no crash.
Adam Barth
Comment 10 2011-08-03 10:56:19 PDT
Perhaps the crash is limited to Chromium? The Gtk folks have also asked for this null-check, but I can't find the bug atm.
Adam Barth
Comment 11 2011-08-03 10:58:14 PDT
Created attachment 102793 [details] Patch for landing
Adam Barth
Comment 12 2011-08-03 11:00:14 PDT
> Strike that - I applied the patch incorrectly. But still no crash. (I assume you tested in DRT and not just in Safari.)
WebKit Review Bot
Comment 13 2011-08-03 11:56:52 PDT
Comment on attachment 102793 [details] Patch for landing Clearing flags on attachment: 102793 Committed r92298: <http://trac.webkit.org/changeset/92298>
WebKit Review Bot
Comment 14 2011-08-03 11:56:57 PDT
All reviewed patches have been landed. Closing bug.
Zhenyao Mo
Comment 15 2011-08-03 12:59:13 PDT
Skipped the added fast/loader/reload-zero-byte-plugin.html in r92306 because of fast/loader/repeat-same-document-navigation.html crashing
Ryosuke Niwa
Comment 16 2011-08-03 18:11:39 PDT
fast/loader/reload-zero-byte-plugin.html started crashing after this patch was landed: http://build.webkit.org/builders/Qt%20Linux%20Release/builds/36101
Adam Barth
Comment 17 2011-08-04 00:33:58 PDT
I added it to the skipped list for Qt.
Adam Barth
Comment 18 2011-09-06 12:42:53 PDT
I'm not sure why this bug is open. Is there more to do here? Should we file another issue about the Qt crash?
Note You need to log in before you can comment on or make changes to this bug.