Closed Bug 1307747 Opened 5 years ago Closed 5 years ago
.size is 0 when a big blob is sent from child process to the parent one
Debugging a completely different issue I found this bug. I'll upload a test case asap.
Attachment #8797995 - Flags: review?(bugs) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/c743f069da42 Remote Blob should use the real size of the blob and not what available from the inputStream, r=smaug
sorry had to backout for failures liek https://treeherder.mozilla.org/logviewer.html#?job_id=37088206&repo=mozilla-inbound
Backout by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9f7e86ac265a Backed out changeset c743f069da42 for test failures in test_blob_sliced_from_child_process.html
empty.html is missing from the patch.
(In reply to Josh Matthews [:jdm] from comment #8) > empty.html is missing from the patch. No, it's not. but splinter doesn't show it because it's... 'empty'.
This is a bit more complex than before. The issue is this: before sending IPCStream for child blobs, we were serializing all the content into a buffer and this buffer was sent to the parent. This means that if we had a MultipartBlobImpl, we were still serializing all in 1 single buffer. Now, we create multiple BlobData for each sub-Blob (see BlobDataFromBlobImpl in dom/ipc/Blob.cpp). But at the same time, we take the size of the blob (in total) considering also the size of each sub-blob. When we recreate the Blob in the parent process, we take that size and we use it for each sub-blob. (the bug). In my patch I keep the size of the single IPCStream together with the stream. I want to file a follow up to cleanup all this blob creation. There are too many types and I guess we can make everything easier to follow.
Comment on attachment 8798343 [details] [diff] [review] blob_bug1307747.patch CreateBlobImpl should be fixed so that it doesn't take unrelated metadata as a param. But that can be done in a followup.
Attachment #8798343 - Flags: review?(bugs) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/3856bf7772ab Remote Blob must have the correct size, r=smaug
You need to log in before you can comment on or make changes to this bug.