Title: [204171] trunk
- Revision
- 204171
- Author
- [email protected]
- Date
- 2016-08-05 09:22:09 -0700 (Fri, 05 Aug 2016)
Log Message
[Fetch API] Response.blob should not assert in case the created blob is empty
https://bugs.webkit.org/show_bug.cgi?id=160592
Patch by Youenn Fablet <[email protected]> on 2016-08-05
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/fetch/api/request/request-consume-expected.txt:
* web-platform-tests/fetch/api/request/request-consume.html: Adding response with empty blob test.
Source/WebCore:
Covered bu updated test.
* Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::FetchBodyConsumer::takeAsBlob): Removing assertion as a response may have a body but with no data in it.
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (204170 => 204171)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-08-05 16:20:23 UTC (rev 204170)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-08-05 16:22:09 UTC (rev 204171)
@@ -1,3 +1,13 @@
+2016-08-05 Youenn Fablet <[email protected]>
+
+ [Fetch API] Response.blob should not assert in case the created blob is empty
+ https://bugs.webkit.org/show_bug.cgi?id=160592
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/fetch/api/request/request-consume-expected.txt:
+ * web-platform-tests/fetch/api/request/request-consume.html: Adding response with empty blob test.
+
2016-08-05 Commit Queue <[email protected]>
Unreviewed, rolling out r203935.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-expected.txt (204170 => 204171)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-expected.txt 2016-08-05 16:20:23 UTC (rev 204170)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-expected.txt 2016-08-05 16:22:09 UTC (rev 204171)
@@ -8,6 +8,7 @@
PASS Consume blob response's body as text
PASS Consume blob response's body as json
PASS Consume blob response's body as arrayBuffer
+PASS Consume blob response's body as blob (empty blob as input)
PASS Consume JSON from text: '"null"'
PASS Consume JSON from text: '"1"'
PASS Consume JSON from text: '"true"'
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.html (204170 => 204171)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.html 2016-08-05 16:20:23 UTC (rev 204170)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.html 2016-08-05 16:22:09 UTC (rev 204171)
@@ -91,6 +91,7 @@
checkBlobResponseBody(blob, textData, "text", checkBodyText);
checkBlobResponseBody(blob, textData, "json", checkBodyJSON);
checkBlobResponseBody(blob, textData, "arrayBuffer", checkBodyArrayBuffer);
+ checkBlobResponseBody(new Blob([""]), "", "blob (empty blob as input)", checkBodyBlob);
var goodJSONValues = ["null", "1", "true", "\"string\""];
goodJSONValues.forEach(function(value) {
Modified: trunk/Source/WebCore/ChangeLog (204170 => 204171)
--- trunk/Source/WebCore/ChangeLog 2016-08-05 16:20:23 UTC (rev 204170)
+++ trunk/Source/WebCore/ChangeLog 2016-08-05 16:22:09 UTC (rev 204171)
@@ -1,3 +1,15 @@
+2016-08-05 Youenn Fablet <[email protected]>
+
+ [Fetch API] Response.blob should not assert in case the created blob is empty
+ https://bugs.webkit.org/show_bug.cgi?id=160592
+
+ Reviewed by Alex Christensen.
+
+ Covered bu updated test.
+
+ * Modules/fetch/FetchBodyConsumer.cpp:
+ (WebCore::FetchBodyConsumer::takeAsBlob): Removing assertion as a response may have a body but with no data in it.
+
2016-08-05 Commit Queue <[email protected]>
Unreviewed, rolling out r203935.
Modified: trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp (204170 => 204171)
--- trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp 2016-08-05 16:20:23 UTC (rev 204170)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp 2016-08-05 16:22:09 UTC (rev 204171)
@@ -117,7 +117,6 @@
Ref<Blob> FetchBodyConsumer::takeAsBlob()
{
- ASSERT(m_buffer);
if (!m_buffer)
return Blob::create();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes