IndexedDB database operations are written such that they must execute
synchronously. For this reason, the add/put operation reads/writes its
Blobs to disk in a synchronous fashion. However, with the introduction
of SendStream-backed Blobs for large (>1 MiB) blobs whose contents are
streamed to the parent replacing nsStringInputStream-backed Blobs
(whose contents were sent up in a single IPC message that might exceed
the size limit and cause a crash), this has no longer been a safe
assumption. However, the problems weren't immediately obvious because
most pre-WASM Blobs are smaller than the 1MiB threshold and even when
they exceeded the size, their memory-backed contents could rapidly be
sent to the parent via IPC, making NS_BASE_STREAM_WOULD_BLOCK errors
rare/hard to reproduce. (rr and its enforced single-threading is a
good way to reproduce, however. Also, see the testing patch on the
bug that introduces artificial delays into SendStream.)
Included SpecialPowersObserver.jsm minor changes to "CreateFiles":
- appendRelativePath is used instead of appendPath because appendPath
only allows a single path component to be appended. In other words,
file creation is limited to files at the root of the profile
directory using appendPath, which is needlessly limiting.
- outStream is now closed even if no data is provided. This is
essential on windows where file deletion only occurs when all handles
are closed. Without this fix, "RemoveFiles" side-effect of deleting
the created files might not take effect until garbage collection runs
and collects the outStream.
Now that Marionette can load about:blank multiple times right after each
other there is no need to prevent using it when turning of the new tab page.
test_about_blank_for_new_docshell can also be updated by using a new tab for
the test. This also gives us a new docshell and can also be run for Fennec.
MozReview-Commit-ID: GWxtsH3nQt
--HG--
extra : rebase_source : 0545382008e874cfeee90fc26ca42ed94ef05b0d
This refactors some of the error logic into a new IniParseError exception. In addition to checking for a 'name' property, we also
check for a 'path' property. This is because some file-like objects coming out of the build system use a 'path' attribute instead
of the standard 'name'.
MozReview-Commit-ID: EXXl9gt1MQk
--HG--
extra : rebase_source : a130824e6724fdef5cf0bd627b19db68ec5fe683
IndexedDB database operations are written such that they must execute
synchronously. For this reason, the add/put operation reads/writes its
Blobs to disk in a synchronous fashion. However, with the introduction
of SendStream-backed Blobs for large (>1 MiB) blobs whose contents are
streamed to the parent replacing nsStringInputStream-backed Blobs
(whose contents were sent up in a single IPC message that might exceed
the size limit and cause a crash), this has no longer been a safe
assumption. However, the problems weren't immediately obvious because
most pre-WASM Blobs are smaller than the 1MiB threshold and even when
they exceeded the size, their memory-backed contents could rapidly be
sent to the parent via IPC, making NS_BASE_STREAM_WOULD_BLOCK errors
rare/hard to reproduce. (rr and its enforced single-threading is a
good way to reproduce, however. Also, see the testing patch on the
bug that introduces artificial delays into SendStream.)
Included SpecialPowersObserver.jsm minor changes to "CreateFiles":
- appendRelativePath is used instead of appendPath because appendPath
only allows a single path component to be appended. In other words,
file creation is limited to files at the root of the profile
directory using appendPath, which is needlessly limiting.
- outStream is now closed even if no data is provided. This is
essential on windows where file deletion only occurs when all handles
are closed. Without this fix, "RemoveFiles" side-effect of deleting
the created files might not take effect until garbage collection runs
and collects the outStream.