author | Barret Rennie <barret@brennie.ca> |
Wed, 09 Dec 2020 05:48:51 +0000 | |
changeset 559951 | 6cc33208cf323ec422d39d534e268e3229bd42a5 |
parent 559950 | d61d3d7f909cddacfea26114c2d46999bb80564a |
child 559952 | 936c49ae59a43abda1ff5beb4215e4671de0dc05 |
push id | 132359 |
push user | brennie@mozilla.com |
push date | Wed, 09 Dec 2020 05:56:04 +0000 |
treeherder | autoland@6cc33208cf32 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | Gijs |
bugs | 1677000 |
milestone | 85.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
dom/system/IOUtils.cpp | file | annotate | diff | comparison | revisions | |
dom/system/IOUtils.h | file | annotate | diff | comparison | revisions |
--- a/dom/system/IOUtils.cpp +++ b/dom/system/IOUtils.cpp @@ -54,18 +54,17 @@ if (nsresult _rv = (_file)->InitWithPath((_path)); NS_FAILED(_rv)) { \ (_promise)->MaybeRejectWithOperationError( \ FormatErrorMessage(_rv, "Could not parse path (%s)", \ NS_ConvertUTF16toUTF8(_path).get())); \ return (_promise).forget(); \ } \ } while (0) -namespace mozilla { -namespace dom { +namespace mozilla::dom { // static helper functions /** * Platform-specific (e.g. Windows, Unix) implementations of XPCOM APIs may * report I/O errors inconsistently. For convenience, this function will attempt * to match a |nsresult| against known results which imply a file cannot be * found. @@ -1412,13 +1411,12 @@ IOUtils::InternalWriteOpts::FromBinding( NS_ConvertUTF16toUTF8(aOptions.mTmpPath.Value()).get())); } } opts.mCompress = aOptions.mCompress; return opts; } -} // namespace dom -} // namespace mozilla +} // namespace mozilla::dom #undef REJECT_IF_SHUTTING_DOWN #undef REJECT_IF_INIT_PATH_FAILED
--- a/dom/system/IOUtils.h +++ b/dom/system/IOUtils.h @@ -402,21 +402,21 @@ class IOUtils::IOError { * for private use in the IOUtils implementation. * * Because web IDL dictionaries are not easily copy/moveable, this class is * used instead, until converted to the proper |mozilla::dom::FileInfo| before * returning any results to JavaScript. */ struct IOUtils::InternalFileInfo { nsString mPath; - FileType mType; - uint64_t mSize; - uint64_t mLastModified; + FileType mType = FileType::Other; + uint64_t mSize = 0; + uint64_t mLastModified = 0; Maybe<uint64_t> mCreationTime; - uint32_t mPermissions; + uint32_t mPermissions = 0; }; /** * This is an easier to work with representation of a * |mozilla::dom::WriteOptions| for private use in the |IOUtils| * implementation. * * Because web IDL dictionaries are not easily copy/moveable, this class is