nsGkAtoms::Home and nsDirectoryAtoms::sOS_HomeDirectory are duplicate static
atoms. This patch comments out the latter to remove the duplication.
MozReview-Commit-ID: LGkjZn0zaoz
There are ways for Create() to return access denied for files which already
exist, particularly in the case of locked files. When it does, createUnique()
should check whether the file exists before considering the attempt a failure.
MozReview-Commit-ID: FyJTghk04jH
--HG--
extra : rebase_source : 10e6f2cb7da18e8e6d410b52a593b7455f0d76fa
The intention is a little more clear with static_assert, as well as
failing sooner. (The code is probably the same, since the compiler will
optimize out the checks as dead code, but meh.)
Reading nsIIDs to binary streams requires 1 + 1 + 1 + 8 calls to Read
for the underlying stream. With the assumption that reading to the
underlying stream for a binary stream is relatively expensive, we should
be able to do better by reading the byte array in an nsIID in a single
Read() request. The same logic applies to writing nsIIDs. Performing a
single operation here should not change the actual bytes read or
written. Performing a single operation also has the virtue of
performing fewer error checks and whatnot.
This adds a fallible version of |NS_UnescapeURL| that can be used to
gracefully handle allocation failures when the string needs to be unescaped.
--HG--
extra : rebase_source : 8d10ca98fb372afe8219d744b147703254e02830
This method is used to replace some GetNativePath usage for logging.
MozReview-Commit-ID: 9nWf2r4oviA
--HG--
extra : rebase_source : b58e45ab38621179cd802979131fdddbfe65079e
extra : intermediate-source : b4ded2247082f98fe18eb640c5fafeb9bc107ac0
extra : source : 21a82c1faeffc7c0d7b3a5ef0ae4c5243c81a586
This method is used by some subsequent patches when unique opaque identifiers are necessary.
MozReview-Commit-ID: AreqK4MHdJP
--HG--
extra : rebase_source : d5b85c2c9212618f54a6ac2f5199651b01c99510
extra : intermediate-source : 67c3c7a1012b9fdd628928bec61472c6ce580616
extra : source : c9a67330c600dbe454fd2ce5025247171e0c0e22
Currently only |value_type| is implemented.
MozReview-Commit-ID: 1mejzvkuako
--HG--
extra : rebase_source : 69e08073adbb9a866db26e515702a0659ece0a70
extra : intermediate-source : 3696381ddfdc19ab2f901ca4247e1cb4efb27731
extra : source : 35d760da1d73dd51614f434c26e5ce80ff690829
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.
--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
OS.File already only supports UTF-8 paths on non-Windows systems, so this
change makes our different ways of accessing file paths consistent with each
other.
MozReview-Commit-ID: 8HiC5xC8tJN
--HG--
extra : rebase_source : 24c77a2e9b4003694e8e96cffab301e7adc0b4e6
1. nsMultiplexInputStream::Available() should not return CLOSED if one of the
streams returns this error value. Instead it must check the following
streams.
2. If a substream is async, available() should not check following streams
until that is closed.
1. nsMultiplexInputStream::Available() should not return CLOSED if one of the
streams returns this error value. Instead it must check the following
streams.
2. If a substream is async, available() should not check following streams
until that is closed.
The users of WriteSegmentFun and ReadSegmentFun read the final out parameter
whether or not the function returns an error. We should make sure to fill it
in with a sane value.
MozReview-Commit-ID: GWDS8gENUMB
--HG--
extra : rebase_source : 0af21f525afd1f036baa15dedb7ac520e646b31e