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

3157 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 6c95916ef8 Bug 1820359 - Move precise max length limits from `nsSegmentedBuffer` to callers, r=xpcom-reviewers,mccr8
This means that the size limits are more accurately applied, as they can
operate on sub-segment precision.

Differential Revision: https://phabricator.services.mozilla.com/D173538
2023-03-24 19:07:44 +00:00
Norisz Fay 64ef41000a Backed out changeset fd2a3531261b (bug 1820359) for causing remote failures in browser_navigationEvents.js 2023-03-21 19:17:04 +02:00
Nika Layzell e5fbd5ef24 Bug 1820359 - Apply nsSegmentedBuffer limits at the segment level, r=xpcom-reviewers,mccr8
Previously this would be checked at the byte count level, which could
end up being less precise.

Differential Revision: https://phabricator.services.mozilla.com/D173051
2023-03-21 15:10:17 +00:00
Nika Layzell ff7f4f17f4 Bug 1818305 - Part 3: Check streamStatus from nsAStreamCopier, r=xpcom-reviewers,mccr8
This will ensure that errors in one side of a NS_AsyncCopy will more reliably
propagate to the other side of the NS_AsyncCopy, by allowing us to check for
situations like stream closure reliably even when the other side either has no
available data, or no available space.

Differential Revision: https://phabricator.services.mozilla.com/D170698
2023-03-15 19:52:34 +00:00
Nika Layzell 3b40268cc1 Bug 1818305 - Part 2: Add a streamStatus method to nsIInputStream, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,valentin,jesup,m_kato,mccr8
This is semantically similar to the existing available() method, however will
not block, and doesn't need to do the work to actually determine the number of
available bytes.

As part of this patch, I also fixed one available() implementation which was
incorrectly throwing NS_BASE_STREAM_WOULD_BLOCK.

Differential Revision: https://phabricator.services.mozilla.com/D170697
2023-03-15 19:52:34 +00:00
Nika Layzell e61507c3a3 Bug 1818305 - Part 1: Add a streamStatus method to nsIOutputStream, r=necko-reviewers,geckoview-reviewers,jesup,emilio,m_kato,devtools-reviewers
This new method can be used to check if the nsIOutputStream has been
closed without having data available to write. It should avoid blocking
to discover this information.

Differential Revision: https://phabricator.services.mozilla.com/D170696
2023-03-15 19:52:33 +00:00
Connor Pearson 1f2604d6dd Bug 1072345 - Change devtools screenshot save location. r=devtools-reviewers,xpcom-reviewers,nchevobbe,mstange,nika
Differential Revision: https://phabricator.services.mozilla.com/D170134
2023-03-09 13:04:50 +00:00
Neil Deakin 1cc5883b43 Bug 1815062, move filename and extension validity checks into SanitizeFileName so that they get called after sanitization is complete, r=Gijs,necko-reviewers
For now, this leaves existing callers of DownloadPaths.sanitize as is using a flag.

Differential Revision: https://phabricator.services.mozilla.com/D169124
2023-02-28 18:57:24 +00:00
Bob Owen 4635db9578 Bug 1816694: Don't call SetNamedSecurityInfoW if permissions are already inherited. r=mhowell
This avoids a syscall and also prevents a lot of unnecessary SeTcbPrivilege
requests which may be audited by security software.

Differential Revision: https://phabricator.services.mozilla.com/D170855
2023-02-28 08:34:06 +00:00
Bob Owen c952d27eac Bug 1772089 p5: Remove content temp dir from Windows and masOS. r=jld,haik,glandium
This defines MOZ_CONTENT_TEMP_DIR to make it easier to track this in the code.
It also uses this to guard some Linux specific uses.

Differential Revision: https://phabricator.services.mozilla.com/D168596
2023-02-24 08:44:41 +00:00
Tom Ritter f19e74be0b Bug 1758681: Remove unneeded defines for MinGW r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D169378
2023-02-15 19:01:58 +00:00
Kagami Sascha Rosylight 0b2130674e Bug 1788986 - Part 4: Add a counter for nsIFile r=xpcom-reviewers,nika,barret,janv
This adds `count` out parameter for recursive file remove calls to report the number of the removed entries.

  Having a lot of files removed by `::Remove(recursive=true)` has been a problem, as a slow disk can cause a hang with such call. A counter feature will help us knowing the situation better via telemetry.

  The use of out parameter here is to mark it optional and prevent unwanted changes in existing callers (because a return value can't be optional).

Differential Revision: https://phabricator.services.mozilla.com/D156940
2023-02-06 11:32:48 +00:00
Iulian Moraru 0caa2f1940 Backed out 3 changesets (bug 1788986) for causing xpcshell failures on test_backgroundtask_removeDirectory.js. CLOSED TREE
Backed out changeset d288a5d5cc3d (bug 1788986)
Backed out changeset 7f30102942bc (bug 1788986)
Backed out changeset 8c8026379e91 (bug 1788986)
2023-02-02 20:58:26 +02:00
Kagami Sascha Rosylight 8fb81ed249 Bug 1788986 - Part 4: Add a counter for nsIFile r=xpcom-reviewers,nika,barret,janv
This adds `count` out parameter for recursive file remove calls to report the number of the removed entries.

  Having a lot of files removed by `::Remove(recursive=true)` has been a problem, as a slow disk can cause a hang with such call. A counter feature will help us knowing the situation better via telemetry.

  The use of out parameter here is to mark it optional and prevent unwanted changes in existing callers (because a return value can't be optional).

Differential Revision: https://phabricator.services.mozilla.com/D156940
2023-02-02 15:23:47 +00:00
Andrew Osmond b87e7bad97 Bug 1811981 - Add ability to run both x86 and ARM Widevine plugins on Windows ARM. r=jld
This patch adds the ability for Windows on ARM to launch either x86 or
ARM Widevine plugins. It also adds the ability for Windows on x86 to
refuse ARM binaries in case, for example, a profile is transferred
between machines.

Overall this should be a non-functional change for users at the time of
landing. It does however allow us to ship the ARM Widevine plugin to
Windows ARM users to workaround a plugin crash with the x86 Widevine
plugin. This only affects Windows 10 users (Windows 11 works fine).

Differential Revision: https://phabricator.services.mozilla.com/D167634
2023-01-31 20:57:11 +00:00
Emilio Cobos Álvarez 20d4fcf500 Bug 1791442 - Explicitly check for SNAP_NAME of MOZ_APP_NAME to detect Snap. r=mkaply,jmaher,xpcom-reviewers,nika
Make snap xpcshell tests run with the right environment variables
instead of tweaking them at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D166523
2023-01-19 10:52:41 +00:00
Iulian Moraru 48c1ab021b Backed out changeset 60cda7d831ca (bug 1791442) for causing bc failures on browser_ua_snap_ubuntu.js. 2023-01-19 07:56:39 +02:00
Emilio Cobos Álvarez 087a17b9bd Bug 1791442 - Explicitly check for SNAP_NAME of MOZ_APP_NAME to detect Snap. r=mkaply,jmaher,xpcom-reviewers,nika
Make snap xpcshell tests run with the right environment variables
instead of tweaking them at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D166523
2023-01-19 01:02:59 +00:00
Nika Layzell 7bb275a4c4 Bug 1804564 - Respect aCount better in EncodeInputStream, r=mccr8,necko-reviewers,jesup
Previously we'd always read the full stream, but if an aCount lower than
the actual size of the stream is provided, we should only encode that
many bytes.

This patch also improves handling of streams shorter than aCount bytes,
ensuring that the generated string is of the correct length.

Differential Revision: https://phabricator.services.mozilla.com/D166616
2023-01-18 22:03:18 +00:00
Nihal Jere 8e6e2e8301 Bug 434327 - Fallback to $HOME in absence of $HOME/Desktop r=settings-reviewers,Gijs
There are many Linux systems where $HOME is preferred as the "default"
directory to $HOME/Desktop.

This prevents the creation of $HOME/Desktop every time about:preferences
is opened.

Differential Revision: https://phabricator.services.mozilla.com/D165979
2023-01-05 23:45:14 +00:00
Sylvestre Ledru 1f8d23143a Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D165559
2022-12-28 09:52:44 +00:00
Robert Longson 3bd3c1b2e5 Bug 1795568 Part 2 - Rewrite deprecated code in nsAppFileLocationProvider.cpp r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D159967
2022-12-20 09:04:57 +00:00
Csoregi Natalia 3853193d23 Backed out changeset c5e3cdc1f944 (bug 1795568) for causing hybrid bustage on nsAppFileLocationProvider.cpp. CLOSED TREE 2022-12-19 23:54:41 +02:00
Robert Longson 21cc8e3ed0 Bug 1795568 Part 2 - Rewrite deprecated code in nsAppFileLocationProvider.cpp r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D159967
2022-12-19 20:46:22 +00:00
Jan Varga cb23cc0476 Bug 1791750 - Add a new argument to serialization methods for passing optional callbacks; r=dom-storage-reviewers,ipc-reviewers,nika,jari
This just about adding a new argument to all relevant places.

Differential Revision: https://phabricator.services.mozilla.com/D164340
2022-12-16 06:38:12 +00:00
Marco Bonardo dcd6608d14 Bug 1786188. r=Gijs,dimi
Differential Revision: https://phabricator.services.mozilla.com/D163275
2022-11-30 13:32:19 +00:00
Valentin Gosu debbbdb50a Bug 1801270 - Rename tentativeResult to statfsResult and quotaResult in nsLocalFile::GetDiskInfo r=jstutte
Depends on D162374

Differential Revision: https://phabricator.services.mozilla.com/D163315
2022-11-30 12:14:45 +00:00
Valentin Gosu ab51944c1d Bug 1801270 - Always set aResult when returning NS_OK from GetDiskInfo r=xpcom-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D162374
2022-11-30 12:14:45 +00:00
Barret Rennie 1677597025 Bug 1786608 - Add nsIFile::accessTime{,OfLink} r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D155926
2022-11-20 22:37:17 +00:00
Barret Rennie 673df4196d Bug 1786608 - Do not set atime on Windows in nsLocalFile::SetModifiedTime r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D155925
2022-11-20 22:37:17 +00:00
Cristian Tuns 2f47e3dacf Backed out 3 changesets (bug 1786608) for causing mochitest failures in test_ioutils_stat_set_modification_time.html CLOSED TREE
Backed out changeset ac137b0db467 (bug 1786608)
Backed out changeset e593e8e2696b (bug 1786608)
Backed out changeset a3fd1df20b66 (bug 1786608)
2022-11-17 00:50:54 -05:00
Barret Rennie cc7b18ee66 Bug 1786608 - Add nsIFile::accessTime{,OfLink} r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D155926
2022-11-17 05:09:18 +00:00
Barret Rennie 2e32887a16 Bug 1786608 - Do not set atime on Windows in nsLocalFile::SetModifiedTime r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D155925
2022-11-17 05:09:18 +00:00
Cristian Tuns c93d8c6464 Backed out 3 changesets (bug 1786608) for causing build bustages CLOSED TREE
Backed out changeset 8eb603c625f4 (bug 1786608)
Backed out changeset 0df0cf8f67b4 (bug 1786608)
Backed out changeset 2b3815684692 (bug 1786608)
2022-11-16 13:58:36 -05:00
Barret Rennie 4c707ccfc8 Bug 1786608 - Add nsIFile::accessTime{,OfLink} r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D155926
2022-11-16 18:31:57 +00:00
Barret Rennie 370e4a098e Bug 1786608 - Do not set atime on Windows in nsLocalFile::SetModifiedTime r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D155925
2022-11-16 18:31:56 +00:00
Daniel Holbert 8d586270bc Bug 1800397: Remove dead code from nsSegmentedBuffer::Init. r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D161966
2022-11-14 23:22:18 +00:00
Daniel Holbert 7f83cbcfba Bug 1800342: Make NS_NewPipe2 and NS_NewPipe infallible, to reflect reality. r=xpcom-reviewers,necko-reviewers,nika,kershaw
This patch doesn't change behavior; these APIs were already effectively
infallible, in the sense that it was impossible for them to return anything
other than NS_OK.

The actual API changes here are in xpcom/io/nsIPipe.idl and
xpcom/io/nsPipe3.cpp, and the rest of this patch is just updates to callsites,
removing code that handled failure-flavored return values from these functions.
(All of this removed code was already dead code, effectively.)

Differential Revision: https://phabricator.services.mozilla.com/D161947
2022-11-14 23:22:16 +00:00
Cristian Tuns 2565d10b35 Backed out 3 changesets (bug 1786608) for causing build bustages CLOSED TREE
Backed out changeset dd0426463627 (bug 1786608)
Backed out changeset f2dcf20b5b44 (bug 1786608)
Backed out changeset 5b7d6807075a (bug 1786608)
2022-11-06 14:04:05 -05:00
Barret Rennie 6d359be1d0 Bug 1786608 - Add nsIFile::accessTime{,OfLink} r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D155926
2022-11-06 18:33:22 +00:00
Barret Rennie 6d99f6fc5c Bug 1786608 - Do not set atime on Windows in nsLocalFile::SetModifiedTime r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D155925
2022-11-06 18:33:22 +00:00
Jan Varga b1ffbdb845 Bug 1791734 - Add nsIRandomAccessStream serialization support; r=ipc-reviewers,necko-reviewers,dom-storage-reviewers,nika,jesup
Only nsFileRandomAccessStream is supported for now.

Differential Revision: https://phabricator.services.mozilla.com/D157794
2022-10-27 16:12:30 +00:00
Jan Varga b03f79878a Bug 1791729 - Expose StreamBufferSource implementations; r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D157791
2022-10-26 18:01:48 +00:00
Jan Varga 8747eec0d4 Bug 1791725 - Add FixedBufferOutputStream; r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D157790
2022-10-26 15:56:38 +00:00
Robert Longson a546daf2d8 Bug 1795568 Part 1 - Remove plugin support code r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159465
2022-10-24 18:56:41 +00:00
Jari Jalkanen cc27d88b5d Bug 1746894 - Handle GetTemporaryStorageLimit failures with upper limit. r=dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D140990
2022-10-24 15:15:33 +00:00
Cristian Tuns 165dbe266b Backed out changeset 02f4220a827c (bug 1746894) for causing mochitest failures on antitracking_head.js CLOSED TREE 2022-10-20 12:43:25 -04:00
Jari Jalkanen e99f516901 Bug 1746894 - Handle GetTemporaryStorageLimit failures with upper limit. r=dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D140990
2022-10-20 15:35:50 +00:00
Cristian Tuns b81c0c9725 Backed out changeset 47a5cc9cd2f6 (bug 1746894) for causing build bustages on ActorsParent.cpp CLOSED TREE 2022-10-20 06:59:31 -04:00
Jari Jalkanen 5731f46ef8 Bug 1746894 - Handle GetTemporaryStorageLimit failures with upper limit. r=dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D140990
2022-10-20 10:42:16 +00:00