Mixed BLOB objects can't be downloaded correctly
Categories
(Core :: DOM: File, defect)
Tracking
()
People
(Reporter: iperione.xix, Assigned: baku)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files, 5 obsolete files)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0
Steps to reproduce:
Tested on FireFox 76.0.1 (Windows 10). Trying to download a BLOB object, built with mixed sources, using its URL obtained via createObjectURL() and retrieved via on-the-fly link technique:
var link = document.createElement ('a');
link.download = a_filename;
link.href = blob_fileurl;
document.body.appendChild (link);
link.click ();
Actual results:
When a BLOB object in javascript is created "mixed", specifically composed by Uint8Array and File objects (ex. new Blob ([array1, file, array2]);), then it can't be downloaded.
Expected results:
A normal download.
Here is a little example, https://jsfiddle.net/3r2yfj1L/
Just select any file and then try to click FULL button: it doesn't work. Works fine when BLOB is not mixed.
Comment 1•4 years ago
|
||
Because this bug's Severity is normal
and has not been changed, and this bug's priority is --
(none,) indicating it has has not been previously triaged, the bug's Severity is being updated to --
(default, untriaged.)
Comment 2•4 years ago
|
||
Using comment 0 testcase, tested on Windows 10:
[Affected:]
76.0.1 20200507114007
77.0b3 20200507233245
78.0a1 20200512212513
[Not affected:]
68.8.0esr 20200429190206
Regression range hints toward
Bug 1472158 - Broadcast BlobURLs only to processes with the same loaded origins, r=farre,asuth
Given Bug 1472158, I'm uncertain if this is a regression or intended behaviour. :baku, could you please take a look?
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Subhamoy, do you want to take a look?
Assignee | ||
Comment 4•4 years ago
|
||
I debugged this issue a bit more on nightly. It could be that the previous firefox versions were buggy because of the blobURL broadcasting, but in nightly, the issue is related to DocumentChannel. Disabling document channel, the downloading of "mixed" blobURLs works perfectly.
I haven't tested it too deeply but it seems that the DocumentChannel actor is not correctly propagated. I suspect the issue is related to how the nsIInputStream (async) is treated by DocumentChannel. Matt, do you mind to take a look?
Comment 5•4 years ago
|
||
It looks we're trying to create a channel in the parent process using the blob url, but the underlying data isn't fully available.
Looking at the blob serialization code here: https://searchfox.org/mozilla-central/rev/df4c90d4b8c92c99f76334acfe4813c573c12661/dom/file/ipc/IPCBlobUtils.cpp#168
It seems like we only serialize as an IPCFile if the blob is of type file, and for all others (including MultipartBlobImpl) we just serialize as an input stream.
Then the parent side trying to read from the blob fails with NS_BASE_STREAM_WOULD_BLOCK.
Do we need to handle serializing Multipart blobs using IPCFile for the file components for them to be available in the parent?
Assignee | ||
Comment 6•4 years ago
|
||
It seems like we only serialize as an IPCFile if the blob is of type file, and for all others (including MultipartBlobImpl) we just serialize as an input stream.
Right. This is correct. There is no "DOM File" involved here. A DOM File, by spec, is a blob with a name. The test does:
const full_blob = new Blob ([head, body, foot], { type: 'application/octet-stream' });
So full_blob is not a DOM File even if it contains a File. In order to have a DOM File the code should do: new File(...), but this is not relevant for the bug.
The serialization part is correct too and we end up sending a MultipartBlobImpl to the parent, because full_blob
is a multipart blob composed by head + body + foot. I suspect that end up creating something like String + IPCBlobInputStream + String, or something similar.
Then the parent side trying to read from the blob fails with NS_BASE_STREAM_WOULD_BLOCK.
This is correct too because the MultipartBlobImpl has an async nsIInputStream. We should use nsIAsyncInputStream::AsyncWait().
Intenally, we create a pipe from content to parent process. The data is read step by step when needed.
Do we need to handle serializing Multipart blobs using IPCFile for the file components for them to be available in the parent?
No :) We just need to read the inputStream properly calling AsyncWait(). If we consider an error NS_BASE_STREAM_WOULD_BLOCK, the code is buggy. Can you tell me where this happen? Note that, if we want to have the size of the stream, we should not use Available() but the nsIInputStreamLength interface. Or, we can simply use the size of the blob from here: https://searchfox.org/mozilla-central/rev/df4c90d4b8c92c99f76334acfe4813c573c12661/dom/file/ipc/IPCBlobUtils.cpp#180
Comment 7•4 years ago
|
||
This is the callstack to NS_BASE_STREAM_WOULD_BLOCK being returned: https://paste.mozilla.org/F0Q16aug
It looks like we're trying to do async copy of the multiplex input stream (created from the multipart blob), and it's failing trying to copy the first segment ('head'), because the pipe is empty.
There are a crazy number of layers of abstraction here, so it's hard to understand what it's trying to do.
The outcome is that we create a channel using the BlobURL synchronized to the parent, and then it calls OnStartRequest with mStatus=NS_BASE_STREAM_WOULD_BLOCK.
Possibly some mix-up with blocking and non-blocking components combined within a single multiplex input stream?
Comment 8•4 years ago
|
||
nsMultiplexInputStream::IsNonBlocking is returning false (meaning we are a blocking stream), because we have 3 sub-streams, two of which are non-blocking, but one is blocking.
We're then running the copy on a background thread to do the blocking read.
nsMultiplexInputStream::Read calls into Read on the first sub-stream (which is non-blocking), and returns NS_BASE_STREAM_WOULD_BLOCK.
The copy code considers that an error, since it expected a blocking stream, and NS_BASE_STREAM_WOULD_BLOCK should never be returned.
Comment 9•4 years ago
|
||
It seems like we need nsMultiplexInputStream to handle the case where we have mixed blocking/non-blocking sub-streams, and present a consistent interface.
It's not obvious how to implement a blocking version of Read that waits on non-blocking sub-streams (unless we can spin the event loop, and wait on AsyncWait on another background thread).
Maybe nsMultiplexInputStream needs to report non-blocking if any of the substreams are non-blocking, and needs to manually handle proxying Read to a background thread (invoking NS_AsyncCopy?) for the blocking substreams.
Assignee | ||
Comment 10•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 11•4 years ago
|
||
Depends on D76901
Comment 12•4 years ago
|
||
This definitely needs automated tests to catch regressions.
Assignee | ||
Comment 13•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 14•4 years ago
|
||
Depends on D76998
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 15•4 years ago
|
||
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3019a2171aed nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 1 - implementation, r=smaug https://hg.mozilla.org/integration/autoland/rev/a388fd40baeb nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 2 - remove the use of nsITellable interface for substreams, r=smaug https://hg.mozilla.org/integration/autoland/rev/2329c5e53493 nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 3 - tests, r=smaug https://hg.mozilla.org/integration/autoland/rev/52322ad2515e nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 4 - support Seek(END) correctly, r=smaug
Assignee | ||
Comment 16•4 years ago
|
||
Comment 17•4 years ago
|
||
Backed out 4 changesets (bug 1636823) for build bustages in workspace/obj-build/dist/include/gtest/gtest.h. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304510367&repo=autoland&lineNumber=17986
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=52322ad2515eb6094a6db61b4033dbe66c800b40
Backout:
https://hg.mozilla.org/integration/autoland/rev/f844295e8bd6c229ab1ef9f4e811d88bfa55e41d
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5d46b483c59c nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 1 - implementation, r=smaug https://hg.mozilla.org/integration/autoland/rev/930874501ab3 nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 2 - remove the use of nsITellable interface for substreams, r=smaug https://hg.mozilla.org/integration/autoland/rev/25455bb698d8 nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 3 - tests, r=smaug https://hg.mozilla.org/integration/autoland/rev/ebb1525ea063 nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 4 - support Seek(END) correctly, r=smaug
Comment 19•4 years ago
|
||
Backed out 4 changesets (bug 1636823) for gtests failures in TestMultiplexInputStream.BlockingVsAsync. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=304529664&repo=autoland&lineNumber=2050
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=ebb1525ea0639fdeda5f65fd016494478ecbfc4d
Backout:
https://hg.mozilla.org/integration/autoland/rev/6dcb40dd0c992e0ce25b75ae2c45aa6154aafaad
Comment 20•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 21•4 years ago
|
||
Comment on attachment 9151851 [details]
Bug 1636823 - nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 1 - implementation, r?smaug
Revision D76901 was moved to bug 1643156. Setting attachment 9151851 [details] to obsolete.
Comment 22•4 years ago
|
||
Comment on attachment 9151852 [details]
Bug 1636823 - nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 2 - remove the use of nsITellable interface for substreams, r?smaug
Revision D76902 was moved to bug 1643156. Setting attachment 9151852 [details] to obsolete.
Comment 23•4 years ago
|
||
Comment on attachment 9151989 [details]
Bug 1636823 - nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 3 - tests, r?smaug
Revision D76998 was moved to bug 1643156. Setting attachment 9151989 [details] to obsolete.
Comment 24•4 years ago
|
||
Comment on attachment 9152140 [details]
Bug 1636823 - nsMultiplexInputStream should not be blocking and nsIAsyncInputStream at the same time - part 4 - support Seek(END) correctly, r?smaug
Revision D77100 was moved to bug 1643156. Setting attachment 9152140 [details] to obsolete.
Assignee | ||
Comment 25•4 years ago
|
||
Assignee | ||
Comment 26•4 years ago
|
||
Depends on D78233
Assignee | ||
Comment 27•4 years ago
|
||
Depends on D78234
Assignee | ||
Comment 28•4 years ago
|
||
Depends on D78235
Updated•4 years ago
|
Comment 29•4 years ago
|
||
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/43aa94cc6640 nsInputTransport must support blocking and async source - part 1 - Use NS_MakeAsyncNonBlockingInputStream, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/2f5c418cb7a9 nsInputTransport must support blocking and async source - part 2 - implementation, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/007bbe713359 nsInputTransport must support blocking and async source - part 3 - move gtests, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/1de589017a6b nsInputTransport must support blocking and async source - part 4 - gtest for inputStreamTransport, r=smaug,necko-reviewers,mayhemer
Comment 30•4 years ago
|
||
Backed out for build bustages.
backout: https://hg.mozilla.org/integration/autoland/rev/3ff4697b6bdae870bc93dd4c4306b9dd57ec80b3
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306127703&repo=autoland&lineNumber=20238
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - In file included from Unified_cpp_netwerk_test_gtest1.cpp:2:
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/checkouts/gecko/netwerk/test/gtest/TestReadStreamToString.cpp(13,20): error: use of undeclared identifier 'NS_NewCStringInputStream'; did you mean 'NS_NewLocalFileInputStream'?
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ASSERT_EQ(NS_OK, NS_NewCStringInputStream(getter_AddRefs(stream), buffer));
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - NS_NewLocalFileInputStream
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h(2001,54): note: expanded from macro 'ASSERT_EQ'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h(1985,29): note: expanded from macro 'GTEST_ASSERT_EQ'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - val1, val2)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(165,40): note: expanded from macro 'ASSERT_PRED_FORMAT2'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(146,43): note: expanded from macro 'GTEST_PRED_FORMAT2_'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(76,52): note: expanded from macro 'GTEST_ASSERT_'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - if (const ::testing::AssertionResult gtest_ar = (expression))
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/checkouts/gecko/netwerk/base/nsNetUtil.h(462,10): note: 'NS_NewLocalFileInputStream' declared here
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - nsresult NS_NewLocalFileInputStream(nsIInputStream** result, nsIFile* file,
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - In file included from Unified_cpp_netwerk_test_gtest1.cpp:2:
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/checkouts/gecko/netwerk/test/gtest/TestReadStreamToString.cpp(13,69): error: no viable conversion from 'nsCString' (aka 'nsTString<char>') to 'nsIFile '
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ASSERT_EQ(NS_OK, NS_NewCStringInputStream(getter_AddRefs(stream), buffer));
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~~~~~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h(2001,54): note: expanded from macro 'ASSERT_EQ'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~~~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h(1985,29): note: expanded from macro 'GTEST_ASSERT_EQ'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - val1, val2)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~~~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(165,40): note: expanded from macro 'ASSERT_PRED_FORMAT2'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(146,43): note: expanded from macro 'GTEST_PRED_FORMAT2_'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(76,52): note: expanded from macro 'GTEST_ASSERT_'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - if (const ::testing::AssertionResult gtest_ar = (expression))
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~~~~~~~~~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/nsTSubstring.h(977,3): note: candidate template ignored: could not match 'mozilla::Span<unsigned char, 4294967295>' against 'nsIFile '
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - operator mozilla::Span<uint8_t>() {
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/nsTSubstring.h(983,3): note: candidate template ignored: could not match 'mozilla::Span<const unsigned char, 4294967295>' against 'nsIFile '
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - operator mozilla::Span<const uint8_t>() const {
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/nsTSubstring.h(940,3): note: candidate function
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - operator mozilla::Span<char_type>() {
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/nsTSubstring.h(944,3): note: candidate function
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - operator mozilla::Span<const char_type>() const {
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/checkouts/gecko/netwerk/base/nsNetUtil.h(462,71): note: passing argument to parameter 'file' here
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - nsresult NS_NewLocalFileInputStream(nsIInputStream result, nsIFile file,
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - In file included from Unified_cpp_netwerk_test_gtest1.cpp:2:
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/checkouts/gecko/netwerk/test/gtest/TestReadStreamToString.cpp(36,20): error: use of undeclared identifier 'NS_NewCStringInputStream'; did you mean 'NS_NewLocalFileInputStream'?
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ASSERT_EQ(NS_OK, NS_NewCStringInputStream(getter_AddRefs(stream), buffer));
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - NS_NewLocalFileInputStream
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h(2001,54): note: expanded from macro 'ASSERT_EQ'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h(1985,29): note: expanded from macro 'GTEST_ASSERT_EQ'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - val1, val2)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(165,40): note: expanded from macro 'ASSERT_PRED_FORMAT2'
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.156Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(146,43): note: expanded from macro 'GTEST_PRED_FORMAT2_'
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2),
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h(76,52): note: expanded from macro 'GTEST_ASSERT_'
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - if (const ::testing::AssertionResult gtest_ar = (expression))
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - /builds/worker/checkouts/gecko/netwerk/base/nsNetUtil.h(462,10): note: 'NS_NewLocalFileInputStream' declared here
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - nsresult NS_NewLocalFileInputStream(nsIInputStream** result, nsIFile* file,
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - ^
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - In file included from Unified_cpp_netwerk_test_gtest1.cpp:2:
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - /builds/worker/checkouts/gecko/netwerk/test/gtest/TestReadStreamToString.cpp(36,69): error: no viable conversion from 'nsCString' (aka 'nsTString<char>') to 'nsIFile *'
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - ASSERT_EQ(NS_OK, NS_NewCStringInputStream(getter_AddRefs(stream), buffer));
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - ^~~~~~
[task 2020-06-12T15:39:08.157Z] 15:39:08 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h(2001,54): note: expanded from macro 'ASSERT_EQ'
Assignee | ||
Updated•4 years ago
|
Comment 31•4 years ago
|
||
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7d220fd9ac49 nsInputTransport must support blocking and async source - part 1 - Use NS_MakeAsyncNonBlockingInputStream, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/9cdc2e31ee04 nsInputTransport must support blocking and async source - part 2 - implementation, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/50dd67f96214 nsInputTransport must support blocking and async source - part 3 - move gtests, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/13ab343d2c45 nsInputTransport must support blocking and async source - part 4 - gtest for inputStreamTransport, r=smaug,necko-reviewers,mayhemer
Comment 32•4 years ago
|
||
Backed out for bustages on TestReadStreamToString.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/b6bc3e51eadfcfb709b74cbc3f94d5fee9cec04b
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306165607&repo=autoland&lineNumber=20051
Assignee | ||
Updated•4 years ago
|
Comment 33•4 years ago
|
||
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/51d94f5560cb nsInputTransport must support blocking and async source - part 1 - Use NS_MakeAsyncNonBlockingInputStream, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/36cb91ca77a0 nsInputTransport must support blocking and async source - part 2 - implementation, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/7b9663a7bdf8 nsInputTransport must support blocking and async source - part 3 - move gtests, r=smaug,necko-reviewers,mayhemer https://hg.mozilla.org/integration/autoland/rev/fe147898a052 nsInputTransport must support blocking and async source - part 4 - gtest for inputStreamTransport, r=smaug,necko-reviewers,mayhemer
Comment 34•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/51d94f5560cb
https://hg.mozilla.org/mozilla-central/rev/36cb91ca77a0
https://hg.mozilla.org/mozilla-central/rev/7b9663a7bdf8
https://hg.mozilla.org/mozilla-central/rev/fe147898a052
Comment 35•4 years ago
|
||
The patch landed in nightly and beta is affected.
:baku, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
Assignee | ||
Comment 36•4 years ago
|
||
Comment on attachment 9154112 [details]
Bug 1636823 - nsInputTransport must support blocking and async source - part 1 - Use NS_MakeAsyncNonBlockingInputStream, r?smaug
Beta/Release Uplift Approval Request
- User impact if declined: Some DOM Files cannot be downloaded.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): This set of patches allows the reading of data from a pipe of a blocking nsIAsyncInputStream.
It touches one of the core functionality of the network communication, and to ensure there are no regression, I added several tests. Because of this, medium risk. - String changes made/needed: none
Assignee | ||
Updated•4 years ago
|
Comment 37•4 years ago
|
||
We've shipped with this bug already, and it's late in beta78, so I think I'd prefer to let this ride to 79. We can consider uplift to 78esr at some point though.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 38•4 years ago
|
||
I managed to reproduce the issue using an older version of Nightly (2020-05-08). I retested everything on macOS 10.13, Windows 10 x64 and Ubuntu 18.04x64 using the latest Nightly 80.a1 and Firefox 79.0b3. The issue is not reproducing anymore.
Updated•4 years ago
|
Comment 39•4 years ago
|
||
Comment on attachment 9154112 [details]
Bug 1636823 - nsInputTransport must support blocking and async source - part 1 - Use NS_MakeAsyncNonBlockingInputStream, r?smaug
Seems like a pretty important compatibility bug. Thanks for including new test coverage and QA verification on Nightly and Beta. Approved for 78.1esr.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 40•4 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-esr78/rev/d66c167025b0
https://hg.mozilla.org/releases/mozilla-esr78/rev/7810eec56857
https://hg.mozilla.org/releases/mozilla-esr78/rev/43b5b2c5e34e
https://hg.mozilla.org/releases/mozilla-esr78/rev/6dcb7d31d7fd
Description
•