Bug 88750 - XHR with .responseType=blob returns 0 size blob
Summary: XHR with .responseType=blob returns 0 size blob
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kinuko Yasuda
URL:
Keywords: InRadar
Depends on: 88844
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-10 21:51 PDT by Taiju Tsuiki
Modified: 2012-06-12 04:55 PDT (History)
5 users (show)

See Also:


Attachments
failcase (315 bytes, text/html)
2012-06-10 21:51 PDT, Taiju Tsuiki
no flags Details
+reading blob with FileReader (549 bytes, text/html)
2012-06-10 22:01 PDT, Taiju Tsuiki
no flags Details
Patch (4.53 KB, patch)
2012-06-11 07:38 PDT, Kinuko Yasuda
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Taiju Tsuiki 2012-06-10 21:51:14 PDT
XHR with .responseType = 'blob' returns Blob, but its .size is set to 0.
Comment 1 Taiju Tsuiki 2012-06-10 21:51:44 PDT
Created attachment 146779 [details]
failcase
Comment 2 Taiju Tsuiki 2012-06-10 22:01:55 PDT
Created attachment 146780 [details]
+reading blob with FileReader

Note that, we can read this blob with FileReader, even if its size is 0.
Comment 3 Kinuko Yasuda 2012-06-11 07:38:03 PDT
Created attachment 146854 [details]
Patch
Comment 4 Alexey Proskuryakov 2012-06-11 13:58:42 PDT
Comment on attachment 146854 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=146854&action=review

> Source/WebCore/xml/XMLHttpRequest.cpp:287
>          if (m_binaryResponseBuilder.get()) {

This is old code, but this ".get()" is unnecessary, and should be removed sooner or later.
Comment 5 Alexey Proskuryakov 2012-06-11 13:59:01 PDT
<rdar://problem/11640154>
Comment 6 Kinuko Yasuda 2012-06-11 21:58:25 PDT
(In reply to comment #4)
> (From update of attachment 146854 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=146854&action=review
> 
> > Source/WebCore/xml/XMLHttpRequest.cpp:287
> >          if (m_binaryResponseBuilder.get()) {
> 
> This is old code, but this ".get()" is unnecessary, and should be removed sooner or later.

Thanks, will delete .get() before landing.
Comment 7 Kinuko Yasuda 2012-06-11 23:18:02 PDT
Committed r120042: <http://trac.webkit.org/changeset/120042>
Comment 8 János Badics 2012-06-12 01:03:56 PDT
Unfortunately this new test fails on every bots since it was introduced in 120042. See https://bugs.webkit.org/show_bug.cgi?id=88844
Comment 9 Kinuko Yasuda 2012-06-12 01:43:15 PDT
(In reply to comment #8)
> Unfortunately this new test fails on every bots since it was introduced in 120042. See https://bugs.webkit.org/show_bug.cgi?id=88844

It looks it's passing at least on chromium.  (In reply to comment #8)
> Unfortunately this new test fails on every bots since it was introduced in 120042. See https://bugs.webkit.org/show_bug.cgi?id=88844

Sorry for the breakage, I'll take a look. (At least it's passing on chromium?)
Comment 10 János Badics 2012-06-12 01:46:34 PDT
> It looks it's passing at least on chromium.  (In reply to comment #8)
> Sorry for the breakage, I'll take a look. (At least it's passing on chromium?)
I'm sorry, it passes only on chromium : )
Comment 11 Kinuko Yasuda 2012-06-12 02:02:38 PDT
(In reply to comment #10)
> > It looks it's passing at least on chromium.  (In reply to comment #8)
> > Sorry for the breakage, I'll take a look. (At least it's passing on chromium?)
> I'm sorry, it passes only on chromium : )

It looks like XHR_RESPONSE_BLOB is not enabled on those platforms and I needed to add the test to Skipped for them.  I'm going to make Skipped changes while I'll take another look.
Comment 12 Mario Sanchez Prada 2012-06-12 04:50:14 PDT
(In reply to comment #11)
> [...]
> It looks like XHR_RESPONSE_BLOB is not enabled on those platforms and I needed 
> to add the test to Skipped for them. 
> I'm going to make Skipped changes while I'll take another look.

I think it would have been better to have filed a bug and use BUGWK###### instead of BUGWKGTK SKIP in the expectations file, so we have a clue were to look at when unskipping it.

Already did it: http://trac.webkit.org/changeset/120059 (new bug reported: 88859)
Comment 13 Kinuko Yasuda 2012-06-12 04:55:39 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > [...]
> > It looks like XHR_RESPONSE_BLOB is not enabled on those platforms and I needed 
> > to add the test to Skipped for them. 
> > I'm going to make Skipped changes while I'll take another look.
> 
> I think it would have been better to have filed a bug and use BUGWK###### instead of BUGWKGTK SKIP in the expectations file, so we have a clue were to look at when unskipping it.
> 
> Already did it: http://trac.webkit.org/changeset/120059 (new bug reported: 88859)

Thanks for doing this!!   I was going to file a new bug but must have done so when I update Skipped/TestExpectations.