Title: [143630] trunk
- Revision
- 143630
- Author
- jap...@chromium.org
- Date
- 2013-02-21 11:19:00 -0800 (Thu, 21 Feb 2013)
Log Message
REGRESSION: Crash in MainResourceLoader::setDataBufferingPolicy when sharing an html5 video via email
https://bugs.webkit.org/show_bug.cgi?id=110075
Reviewed by Alexey Proskuryakov.
Source/WebCore:
Test: webarchive/loading/video-in-webarchive.html
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterContentPolicy): isStopping()
isn't accurate to determine whether a SubstituteData load should
continue, as this point in the code shouldn't be reachable from any point
where isStopping() would return true. DocumentLoader might have completely
stopped and believe that MainResourceLoader is complete, though. Don't
continue in that case.
(WebCore::MainResourceLoader::setDataBufferingPolicy): m_resource can be null
in a reasonable case, handle it rather than asserting that it can't be null.
LayoutTests:
* webarchive/loading/resources/video-in-webarchive.webarchive: Added.
* webarchive/loading/video-in-webarchive-expected.txt: Added.
* webarchive/loading/video-in-webarchive.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (143629 => 143630)
--- trunk/LayoutTests/ChangeLog 2013-02-21 19:09:07 UTC (rev 143629)
+++ trunk/LayoutTests/ChangeLog 2013-02-21 19:19:00 UTC (rev 143630)
@@ -1,3 +1,14 @@
+2013-02-21 Nate Chapin <jap...@chromium.org>
+
+ REGRESSION: Crash in MainResourceLoader::setDataBufferingPolicy when sharing an html5 video via email
+ https://bugs.webkit.org/show_bug.cgi?id=110075
+
+ Reviewed by Alexey Proskuryakov.
+
+ * webarchive/loading/resources/video-in-webarchive.webarchive: Added.
+ * webarchive/loading/video-in-webarchive-expected.txt: Added.
+ * webarchive/loading/video-in-webarchive.html: Added.
+
2013-02-21 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r143616.
Added: trunk/LayoutTests/webarchive/loading/resources/video-in-webarchive.webarchive (0 => 143630)
--- trunk/LayoutTests/webarchive/loading/resources/video-in-webarchive.webarchive (rev 0)
+++ trunk/LayoutTests/webarchive/loading/resources/video-in-webarchive.webarchive 2013-02-21 19:19:00 UTC (rev 143630)
@@ -0,0 +1,12 @@
+bplist00\xD2_WebSubframeArchives_WebMainResource\xA1\xD1\xD5
+
+_WebResourceFrameName^WebResourceURL_WebResourceData_WebResourceMIMEType_WebResourceTextEncodingName_ <!--framePath //<!--frame0-->-->_[file:///Volumes/MacintoshHD2/src/webkit/LayoutTests/webarchive/loading/resources/empty.mpegO\xDF<html><body marginwidth="0" marginheight="0"><embed width="100%" height="100%" name="plugin" src="" type="video/mpeg"></body></html>Zvideo/mpegUUTF-8\xD5
+P_Pfile:///Volumes/MacintoshHD2/src/webkit/LayoutTests/webarchive/loading/test.htmlO\xC2<html><head><script>
+window._onload_ = function() {
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+</head><body><iframe src=""
+</body></html>Ytext/htmlUUTF-8
+ # 5 7 : E \ k } \x93 \xB1 \xD42%01\x84IS Y
\ No newline at end of file
Added: trunk/LayoutTests/webarchive/loading/video-in-webarchive-expected.txt (0 => 143630)
--- trunk/LayoutTests/webarchive/loading/video-in-webarchive-expected.txt (rev 0)
+++ trunk/LayoutTests/webarchive/loading/video-in-webarchive-expected.txt 2013-02-21 19:19:00 UTC (rev 143630)
@@ -0,0 +1,16 @@
+main frame - didStartProvisionalLoadForFrame
+main frame - didCommitLoadForFrame
+main frame - willPerformClientRedirectToURL: resources/video-in-webarchive.webarchive
+main frame - didFinishDocumentLoadForFrame
+main frame - didFinishLoadForFrame
+main frame - didStartProvisionalLoadForFrame
+main frame - didCancelClientRedirectForFrame
+main frame - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
+main frame - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
+main frame - didFinishLoadForFrame
+frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
+
Added: trunk/LayoutTests/webarchive/loading/video-in-webarchive.html (0 => 143630)
--- trunk/LayoutTests/webarchive/loading/video-in-webarchive.html (rev 0)
+++ trunk/LayoutTests/webarchive/loading/video-in-webarchive.html 2013-02-21 19:19:00 UTC (rev 143630)
@@ -0,0 +1,7 @@
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+window.location="resources/video-in-webarchive.webarchive";
+</script>
Modified: trunk/Source/WebCore/ChangeLog (143629 => 143630)
--- trunk/Source/WebCore/ChangeLog 2013-02-21 19:09:07 UTC (rev 143629)
+++ trunk/Source/WebCore/ChangeLog 2013-02-21 19:19:00 UTC (rev 143630)
@@ -1,3 +1,22 @@
+2013-02-21 Nate Chapin <jap...@chromium.org>
+
+ REGRESSION: Crash in MainResourceLoader::setDataBufferingPolicy when sharing an html5 video via email
+ https://bugs.webkit.org/show_bug.cgi?id=110075
+
+ Reviewed by Alexey Proskuryakov.
+
+ Test: webarchive/loading/video-in-webarchive.html
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::continueAfterContentPolicy): isStopping()
+ isn't accurate to determine whether a SubstituteData load should
+ continue, as this point in the code shouldn't be reachable from any point
+ where isStopping() would return true. DocumentLoader might have completely
+ stopped and believe that MainResourceLoader is complete, though. Don't
+ continue in that case.
+ (WebCore::MainResourceLoader::setDataBufferingPolicy): m_resource can be null
+ in a reasonable case, handle it rather than asserting that it can't be null.
+
2013-02-21 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r143616.
Modified: trunk/Source/WebCore/loader/MainResourceLoader.cpp (143629 => 143630)
--- trunk/Source/WebCore/loader/MainResourceLoader.cpp 2013-02-21 19:09:07 UTC (rev 143629)
+++ trunk/Source/WebCore/loader/MainResourceLoader.cpp 2013-02-21 19:19:00 UTC (rev 143630)
@@ -363,7 +363,7 @@
if (!m_documentLoader->isStopping() && m_substituteData.isValid()) {
if (m_substituteData.content()->size())
dataReceived(0, m_substituteData.content()->data(), m_substituteData.content()->size());
- if (!m_documentLoader->isStopping())
+ if (m_documentLoader->isLoadingMainResource())
didFinishLoading(0);
}
}
@@ -719,8 +719,8 @@
void MainResourceLoader::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPolicy)
{
- ASSERT(m_resource);
- m_resource->setDataBufferingPolicy(dataBufferingPolicy);
+ if (m_resource)
+ m_resource->setDataBufferingPolicy(dataBufferingPolicy);
}
ResourceLoader* MainResourceLoader::loader() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes