Граф коммитов

3004 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 5e3a231f28 Bug 1762708 - Use async dbus for revealing files in nsGIOService. r=stransky
This at least doesn't block the UI, even though the file could take a while to
show up.

Depends on D143606

Differential Revision: https://phabricator.services.mozilla.com/D143607
2022-04-15 23:28:08 +00:00
Nika Layzell 3a5d9a53ba Bug 1435766 - Reimplement nsDirectoryService Mac getters in terms of GetSpecialSystemDirectory, r=xpcom-reviewers,mccr8
This makes the getters more consistent with getters on other platforms,
and theoretically provides a faster way of getting these directories
from C++ code in the future.

Differential Revision: https://phabricator.services.mozilla.com/D142871
2022-04-06 20:43:07 +00:00
Stephen A Pohl 9fe39b5f5d Bug 1761481: Improve the conversion of line breaks. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D142104
2022-04-06 17:45:45 +00:00
Jan Rio Krause 057785b6d5 Bug 1519200 - Remove `NS_ERROR_FILE_TARGET_DOES_NOT_EXIST` in favor of `NS_ERROR_FILE_NOT_FOUND`. r=xpcom-reviewers,nika,dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D77575
2022-04-05 15:17:03 +00:00
Nathan Froyd 45d38d17c1 Bug 1478146 - Use SetFilePointerEx in nsLocalFileWin.cpp r=nika
Differential Revision: https://phabricator.services.mozilla.com/D142883
2022-04-04 20:39:04 +00:00
Masatoshi Kimura 030cb502bf Bug 1761438 - Remove nsILocalFileWin::GetNativeCanonicalPath. r=xpcom-reviewers,application-update-reviewers,mccr8,nalexander
I removed the last caller.

Depends on D142051

Differential Revision: https://phabricator.services.mozilla.com/D142052
2022-03-26 00:52:07 +00:00
Nika Layzell 789c8553d9 Bug 1761548 - Add basic locking to nsStorageStream, r=xpcom-reviewers,mccr8
This should make it slightly safer to to try to read from a
nsStorageInputStream while the stream is being concurrently written to
on another thread, though it will still not behave very well as there is
no nsIAsyncInputStream support.

Individual input streams are still non-threadsafe with this change.

Differential Revision: https://phabricator.services.mozilla.com/D142135
2022-03-25 22:29:02 +00:00
Randell Jesup 2c0c956707 Bug 1207753 - Various xpcom thread-safety annotations r=nika
Differential Revision: https://phabricator.services.mozilla.com/D130579
2022-03-23 22:22:51 +00:00
Nicholas Rishel 79aad2eea4 Bug 1722777 - Pre: files contained within a folder implicitly must have a longer path; make this explicit for clarity. r=nalexander
Depends on D140910

Differential Revision: https://phabricator.services.mozilla.com/D140911
2022-03-22 00:28:23 +00:00
Nicholas Rishel 38f65972b7 Bug 1722777 - Pre: Reuse existing directory iteration function when deleting folder content on Windows. r=nalexander
Depends on D140428

Differential Revision: https://phabricator.services.mozilla.com/D140910
2022-03-22 00:28:22 +00:00
Nicholas Rishel 9e17c0d135 Bug 1722777 - Pre: Add comment explaining why Windows recursive folder deletion uses neither `SHFileOperation` nor `IFileOperation` APIs. r=nalexander
Depends on D140427

Differential Revision: https://phabricator.services.mozilla.com/D140428
2022-03-22 00:28:22 +00:00
Randell Jesup c5917ed65a Bug 1207753: Basic thread-safety annotations to quiet errors until real annotations land r=nika
Differential Revision: https://phabricator.services.mozilla.com/D141062
2022-03-17 18:39:15 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Jan Rio Krause 10f92fad6c Bug 1757754 - Fix MinGW build failure by defining `ERROR_CONTENT_BLOCKED`. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D140212
2022-03-04 05:52:19 +00:00
Jan Rio Krause f1571e65c4 Bug 1690326 - Map Windows error `0x510 ERROR_CONTENT_BLOCKED` to `NS_ERROR_FILE_ACCESS_DENIED`. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D139968
2022-03-02 14:10:19 +00:00
Masatoshi Kimura 97d32e6c03 Bug 1751840 - Make nsLocalFileWin::Equals compare long names before trying 8.3 names. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D137339
2022-02-19 12:37:10 +00:00
Emilio Cobos Álvarez 00f5ea846d Bug 1755896 - Add support from AString to ACString Base64 decoding. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D139029
2022-02-18 10:42:10 +00:00
Nika Layzell de1e97c891 Bug 1754040 - Clean up common shared WriteSegments helper functions, r=necko-reviewers,xpcom-reviewers,mccr8
These helper methods are similar to the related ones for
nsIInputStream::ReadSegments, and can be used to implement
nsIOutputStream::Write and nsIOutputStream::WriteFrom in terms of
WriteSegments.

There were various places which used manual copies of these methods, which are
being unified.

Differential Revision: https://phabricator.services.mozilla.com/D138334
2022-02-14 23:59:35 +00:00
Jan Rio Krause 4905393a20 Bug 1690326 - Map Windows error `ERROR_DISK_CORRUPT` to `NS_ERROR_FILE_FS_CORRUPTED`. r=xpcom-reviewers,dom-storage-reviewers,jstutte,nika
Differential Revision: https://phabricator.services.mozilla.com/D138162
2022-02-09 15:27:33 +00:00
Masatoshi Kimura 4d3b2121cb Bug 1752683 - Make nsILocalFileWin.canonicalPath [noscript]. r=xpcom-reviewers,mccr8
No JS callers use this attribute anymore.

Differential Revision: https://phabricator.services.mozilla.com/D137380
2022-01-31 19:43:37 +00:00
Paul Zuehlcke 47129a9cd9 Bug 1746645 - Generate EscapeChars array programmatically. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D136222
2022-01-19 10:21:05 +00:00
Nika Layzell 4f556b1bea Bug 1748719 - Make nsStringInputStream more flexible as to the backing data buffer, r=mccr8
This change aims to make the way that the nsStringInputStream owns the backing
data buffer more flexible. This has a few impacts, including allowing
arbitrarily large payload sizes on 64-bit platforms, not requiring as complex
checks around borrowed string buffers or nsTArray data storage, and supporting
custom data ownership schemes such as those used by blobs.

The new system uses a separate refcounted object internally to provide the
contiguous backing buffer, with the nsStringInputStream wrapping it and
providing the `nsIInputStream` interface and cursor. This also avoids issues
around the buffer being mutated during reads, as mutating the `nsIInputStream`
no longer mutates the actual data storage object.

Differential Revision: https://phabricator.services.mozilla.com/D135162
2022-01-07 20:34:52 +00:00
Randell Jesup 7a46e96bdf Bug 1746488: xpcom/io cleanup r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134062
2022-01-04 14:21:56 +00:00
Barret Rennie 772d29da89 Bug 1736331 - Add nsILocalFileMac methods for interacting with extended attributes r=nika
This patch adds support for setting, getting, and reading extended filesystem
attributes on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D133836
2021-12-25 00:30:10 +00:00
Butkovits Atila 1ce2eea394 Backed out 2 changesets (bug 1736331) for causing failures at test_ioutils_mac_xattr.html. CLOSED TREE
Backed out changeset 3d627a038faa (bug 1736331)
Backed out changeset b0df890ed09e (bug 1736331)
2021-12-24 03:26:45 +02:00
Barret Rennie f93fd9cc79 Bug 1736331 - Add nsILocalFileMac methods for interacting with extended attributes r=nika
This patch adds support for setting, getting, and reading extended filesystem
attributes on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D133836
2021-12-23 23:02:13 +00:00
Toshihito Kikuchi 7d38851282 Bug 1746114 - Part1. Avoid delayloading shlwapi.dll in a sandboxed process. r=mhowell
While processing third-party module loading events, the process may delayload
shlwapi.dll.  This could be a problem if the process is sandboxed and the access
to local files is restricted.  Before enabling the third-party modules ping in
socket process, this patch avoids such delayloading.

The first path is `ParamTraits<mozilla::ModuleRecord>::Read` calls `NS_NewLocalFile`
that calls `PathGetDriveNumberW`.  This API is simple enough that we define our own
version.

The second path is the ctor of `ProcessedModuleLoadEvent` that is called from
`UntrustedModulesProcessor::CompleteProcessing` calls `PreparePathForTelemetry`
that calls `PathFindFileNameW` and `PathCanonicalizeW`.  For this path, instead
of sanitizing a requested name in `ProcessedModuleLoadEvent`'s ctor, we sanitize
it when transferring it to the main process.

Differential Revision: https://phabricator.services.mozilla.com/D134492
2021-12-23 02:15:35 +00:00
Sandor Molnar 8032ae5c31 Backed out 2 changesets (bug 1736331) for causing build bustages in IOUtils. CLOSED TREE
Backed out changeset 5745c2669e88 (bug 1736331)
Backed out changeset 0a34c502e65f (bug 1736331)
2021-12-22 22:04:10 +02:00
Barret Rennie de949e8aca Bug 1736331 - Add nsILocalFileMac methods for interacting with extended attributes r=nika
This patch adds support for setting, getting, and reading extended filesystem
attributes on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D133836
2021-12-22 19:46:15 +00:00
Csoregi Natalia cbfb9e9a8e Backed out 2 changesets (bug 1736331) for bustage on IOUtils.webidl CLOSED TREE
Backed out changeset 293085bdd5a1 (bug 1736331)
Backed out changeset 275621f46891 (bug 1736331)
2021-12-22 19:09:54 +02:00
Barret Rennie 83aee913ba Bug 1736331 - Add nsILocalFileMac methods for interacting with extended attributes r=nika
This patch adds support for setting, getting, and reading extended filesystem
attributes on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D133836
2021-12-22 16:40:52 +00:00
Cristian Tuns ca67207453 Backed out changeset e38313bed466 (bug 1746488) for causing mochitest failures on Mutex_posix.cpp CLOSED TREE 2021-12-21 05:11:33 -05:00
Randell Jesup ab601abc5a Bug 1746488: xpcom/io cleanup r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134062
2021-12-21 04:19:28 +00:00
Narcis Beleuzu 6362ac3673 Backed out changeset 13d5eefbe7be (bug 1746488) for bustages on nsMultiplexInputStream.cpp . CLOSED TREE 2021-12-21 01:53:37 +02:00
Randell Jesup 06dc3b2198 Bug 1746488: xpcom/io cleanup r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134062
2021-12-20 23:30:10 +00:00
Barret Rennie aa50724818 Bug 1743404 - Provide {Get,Set}WindowsFileAttributes on nsILocalFileWin r=nika
Differential Revision: https://phabricator.services.mozilla.com/D133834
2021-12-17 17:21:21 +00:00
Barret Rennie be14a5fa64 Bug 1744316 - Replace nsILocalFileWin::FileAttributes with ::ReadOnly r=nika,application-update-reviewers,nalexander
This replaces the under-used FileAttributes attribute with a ReadOnly
attribute, since that is the only Windows file attribute that was being
toggled. This attribute is only used in tests to simulate lack of writing
permissions to certain files.

Differential Revision: https://phabricator.services.mozilla.com/D133833
2021-12-16 18:06:42 +00:00
Marian-Vasile Laza 708d0dccc2 Backed out 2 changesets (bug 1744809, bug 1744316) for causing xpcshell failures on marAppApplyDirLockedStageFailure_win.js.
Backed out changeset d14261ebd3b1 (bug 1744316)
Backed out changeset dbbcea46c9d9 (bug 1744809)
2021-12-16 03:31:32 +02:00
Barret Rennie 0b118ad533 Bug 1744316 - Replace nsILocalFileWin::FileAttributes with ::ReadOnly r=nika,application-update-reviewers,nalexander
This replaces the under-used FileAttributes attribute with a ReadOnly
attribute, since that is the only Windows file attribute that was being
toggled. This attribute is only used in tests to simulate lack of writing
permissions to certain files.

Differential Revision: https://phabricator.services.mozilla.com/D133833
2021-12-15 19:56:08 +00:00
Nika Layzell 7b2e6d4996 Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
Jari Jalkanen 986851e08e Bug 1740212 - Get disk capacity on Windows. r=dom-storage-reviewers,janv,xpcom-reviewers,nika DONTBUILD
Depends on D130640

Differential Revision: https://phabricator.services.mozilla.com/D130908
2021-12-08 16:08:03 +00:00
Jan Varga 1a3d2b084c Bug 1735717 - Add a way for getting information about total disk space (disk capacity); r=dom-storage-reviewers,jari,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D130640
2021-12-08 14:41:38 +00:00
Nika Layzell 46939c00ef Bug 1740797 - Use an owning string when serializing nsStringInputStream as a pipe, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131443
2021-12-07 19:58:52 +00:00
Jan Rio Krause 9ca25eb33e Bug 1704495 - Map Windows error `ERROR_CANNOT_MAKE` to `NS_ERROR_FILE_ACCESS_DENIED`. r=xpcom-reviewers,dom-storage-reviewers,nika,jstutte
Depends on D130906

Differential Revision: https://phabricator.services.mozilla.com/D130907
2021-11-17 14:34:44 +00:00
Jan Rio Krause 065a41c6e0 Bug 1704495 - Map Windows errors `ERROR_INVALID_BLOCK`, `ERROR_INVALID_HANDLE`, `ERROR_ARENA_TRASHED` to `NS_ERROR_FILE_INVALID_HANDLE`. r=xpcom-reviewers,dom-storage-reviewers,nika,jstutte
Depends on D130905

Differential Revision: https://phabricator.services.mozilla.com/D130906
2021-11-17 14:34:43 +00:00
Jan Rio Krause dc2fb88695 Bug 1704495 - Map Windows error `ERROR_NOT_READY` to `NS_ERROR_FILE_DEVICE_TEMPORARY_FAILURE`. r=xpcom-reviewers,dom-storage-reviewers,nika,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D130905
2021-11-17 14:34:43 +00:00