gecko-dev/testing/specialpowers
Andrew Sutherland 8e593b76bd Bug 1319531 - Ensure all streams provided by DatabaseFile can be read without generating NS_BASE_STREAM_WOULD_BLOCK errors. r=janv
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.
2017-01-30 01:07:27 -05:00
..
content Bug 1319531 - Ensure all streams provided by DatabaseFile can be read without generating NS_BASE_STREAM_WOULD_BLOCK errors. r=janv 2017-01-30 01:07:27 -05:00
Makefile.in Bug 1219442 - Re-write specialpowers as a restartless addon, r=jmaher 2015-11-05 10:00:59 -05:00
bootstrap.js Bug 1219442 - Re-write specialpowers as a restartless addon, r=jmaher 2015-11-05 10:00:59 -05:00
install.rdf Bug 1219442 - Re-write specialpowers as a restartless addon, r=jmaher 2015-11-05 10:00:59 -05:00
jar.mn Bug 1027734 - Convert mozPay to WebIDL. r=bzbarsky. 2016-01-26 18:38:03 +01:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00