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

2907 Коммитов

Автор SHA1 Сообщение Дата
Csoregi Natalia d97e4efd8e Backed out 9 changesets (bug 1681529) for causing bustage on TestSeekableStreamWrapper.cpp. CLOSED TREE
Backed out changeset 99d1c9682dc2 (bug 1681529)
Backed out changeset b562b6038855 (bug 1681529)
Backed out changeset 5a5f514a6cfe (bug 1681529)
Backed out changeset ceb55436928a (bug 1681529)
Backed out changeset 9852de883959 (bug 1681529)
Backed out changeset 1a33ea8b533d (bug 1681529)
Backed out changeset 3385635e9521 (bug 1681529)
Backed out changeset 49c28bfc4da4 (bug 1681529)
Backed out changeset 43cc14af229d (bug 1681529)
2021-01-25 23:40:44 +02:00
Nika Layzell 85511dac91 Bug 1681529 - Part 8: Handle clones of closed nsPipeInputStreams, r=baku
Previously if `Clone()` was called on a closed nsPipeInputStream, it could cause
crashes due to the already-closed nsPipeInputStream being added to mInputList,
violating internal nsPipe invariants. Skipping adding the stream to that list
should avoid this edge-case, as the pipe is already closed.

Differential Revision: https://phabricator.services.mozilla.com/D101807
2021-01-20 16:18:17 +00:00
Nika Layzell aced9c0ee0 Bug 1681529 - Part 6: Introduce a SeekableStreamWrapper to make pipes seekable, r=baku
This patch introduces a new SeekableStreamWrapper class which handles adapting
nsIInputStreams which support being cheaply cloned using nsICloneableInputStream
into seekable input streams by operating on a clone of the original stream, and
re-cloning that stream when seeking backwards.

This wrapper is generally intended to be used with nsPipeInputStream as that
type supports both a fairly cheap clone operation, and keeping a large internal
buffer which is fairly cheap to seek using this method, but should also work
with other types such as RemoteLazyInputStream or nsStringStream.

An alternate strategy was considered where nsPipe was given internal support for
a mSeekable flag to be set on creation. This flag would then have a similar
effect, except with additional optimizations due to being visible within the
implementation of the nsPipe, rather than relying on an unadvanced
nsPipeInputStream to keep the buffer alive.

I ended up choosing this approach instead for a few reasons:

 * The seekable adapter can be applied to an already-created nsPipeInputStream,
   such as one received from IPC. With the nsPipe approach, making an IPC stream
   seekable either requires telling IPCStreamDestination to use a seekable pipe
   ahead of time, or performing a NS_AsyncCopy from the IPC-provided pipe into a
   different seekable pipe, which is likely wasted effort and would prevent
   optimizations such as RemoteLazyInputStream and DelayedStart streams.
 * The adapter can support other features of the underlying stream, such as
   nsIInputStreamLength, without resorting to adding additional adapter layers
   on top of the returned nsPipe.
 * The performance is unlikely to be substantially different in the most common
   case, which is using Seek(NS_SEEK_SET, 0) to return to the beginning of the
   stream.
 * Less additional complexity is added to the already-complicated internals of
   nsPipe, and instead it is kept in a separate wrapper stream, which is easier
   to review.

Using nsStorageStream, as is used by EnsureUploadStreamIsCloneable, was also
considered, but was rejected as it has similar problems to the seekable nsPipe
approach and also doesn't implement nsIAsyncStream, meaning that one must wait
for the NS_AsyncCopy to be completed before reading the stream.

It may actually be possible to replace the existing uses of nsStorageStream with
a wrapped nsPipe in the future, but that is left as follow-up material, and may
have memory overhead implications due to nsPipe not resizing the final segment,
unlike nsStorageStream.

Differential Revision: https://phabricator.services.mozilla.com/D101805
2021-01-20 16:19:50 +00:00
Simon Giesecke c3f51da721 Bug 1686041 - Map unknown Win32 API error codes to a module of its own in nsLocalFileWin. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D102141
2021-01-19 14:35:03 +00:00
Simon Giesecke 9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Andrew McCreight 4ae7e718f0 Bug 1539948, part 3 - Only allow nostdcall methods and attributes on builtinclass interfaces. r=nika
We don't properly implement them in JS, so only allow them for C++.

This patch also makes the only remaining non-builtinclass interface
with a nostdcall method, nsIBinaryOutputStream, builtinclass.

This also changes the isScriptable() method to be consistent,
though I think the change doesn't matter because the only
place that calls it also checks if the interface is builtinclass.

Differential Revision: https://phabricator.services.mozilla.com/D98863
2020-12-09 02:41:19 +00:00
Razvan Maries 35ccea0325 Backed out 3 changesets (bug 1539948) for build bustages on nsISocketTransport.h. CLOSED TREE
Backed out changeset 81bed88d0adf (bug 1539948)
Backed out changeset 8bf24bdf431f (bug 1539948)
Backed out changeset ef4e49b3701d (bug 1539948)
2020-12-09 02:47:52 +02:00
Andrew McCreight d7be14b9d2 Bug 1539948, part 3 - Only allow nostdcall methods and attributes on builtinclass interfaces. r=nika
We don't properly implement them in JS, so only allow them for C++.

This patch also makes the only remaining non-builtinclass interface
with a nostdcall method, nsIBinaryOutputStream, builtinclass.

This also changes the isScriptable() method to be consistent,
though I think the change doesn't matter because the only
place that calls it also checks if the interface is builtinclass.

Differential Revision: https://phabricator.services.mozilla.com/D98863
2020-12-08 21:19:08 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Karl Tomlinson 88c7f3ad66 Bug 1119956 derive from DiscardableRunnable instead of CancelableRunnable when Cancel() is not supported r=asuth,sg
Differential Revision: https://phabricator.services.mozilla.com/D98118
2020-12-03 09:04:44 +00:00
Barret Rennie e0e9d2d31b Bug 1660841 - Provide file creation time via nsIFile::creationTime{,ofLink} r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96889
2020-12-03 04:10:47 +00:00
Valentin Gosu fbac36fa65 Bug 1667581 - Ensure there's only one nsSegmentedBuffer::FreeOMT pending at any time r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97368
2020-11-26 08:15:03 +00:00
Valentin Gosu 6fe922232a Bug 1667581 - Batch calls to nsSegmentedBuffer::FreeOMT when dispatching to a background thread r=baku,sg,KrisWright
This is a workaround for bug 1670737 to avoid spamming a saturated
thread pool with too many events.
Also converts some unused code to a gtest.

Differential Revision: https://phabricator.services.mozilla.com/D93995
2020-11-25 18:21:38 +00:00
Barret Rennie 927272a89b Bug 1665172 - Add nsIFile::MoveToFollowingLinks{,Native} methods r=nika
Differential Revision: https://phabricator.services.mozilla.com/D96137
2020-11-10 15:56:47 +00:00
Valentin Gosu 07f304d057 Bug 1675203 - Backed out changeset 0bcd9a5ae49f (Bug 1667581) for causing memory usage regressions a=backout
Differential Revision: https://phabricator.services.mozilla.com/D96007
2020-11-05 10:43:09 +00:00
tobar2018 d7a64d8211 Bug 1673051 - Remove OnYosemiteOrLater(), OnElCapitanOrLater(), and OnSierraOrLater(). r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D95304
2020-11-02 16:25:18 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Valentin Gosu 8374754c9b Bug 1667581 - Use a BackgroundTaskQueue to free up memory segments from nsSegmentedBuffer off main thread r=baku,sg
Also converts some unused code to a gtest.

Differential Revision: https://phabricator.services.mozilla.com/D93995
2020-10-22 10:47:39 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
David Major 05303de70a Bug 1667872 - Fix GetWindowsFolder storage r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D91780
2020-09-30 23:58:23 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Mike Hommey 8b395e71b1 Bug 1664077 - Remove xpcom-private.h. r=sg
It's not necessary anymore.

Differential Revision: https://phabricator.services.mozilla.com/D90206
2020-09-15 14:53:10 +00:00
Mike Hommey a60555aa8c Bug 1664077 - Move statvfs-related defines from nsLocalFileUnix.h to .cpp. r=sg
They are not needed anywhere else than the .cpp, and can cause problems
from the additional includes they pull.

Differential Revision: https://phabricator.services.mozilla.com/D90205
2020-09-15 14:53:07 +00:00
Mark Banner 5a80757288 Bug 1619926 - Remove distribution search directory provider definitions. r=daleharvey
Also remove DirectoryProvider as it is now unused.

Depends on D88018

Differential Revision: https://phabricator.services.mozilla.com/D88019
2020-09-01 18:08:22 +00:00
Butkovits Atila 7b340f9684 Backed out 15 changesets (bug 1612824, bug 1661234, bug 1619926, bug 1612380, bug 1559530, bug 1642990) for Xpc failures. CLOSED TREE
Backed out changeset 426d017d7e46 (bug 1642990)
Backed out changeset 84ab4021d403 (bug 1559530)
Backed out changeset 82a8305543e5 (bug 1559530)
Backed out changeset 38832c1185b8 (bug 1559530)
Backed out changeset f16918c10a6b (bug 1661234)
Backed out changeset 3a13258fbd51 (bug 1661234)
Backed out changeset abf8d8b24845 (bug 1612824)
Backed out changeset 7dfeb065a385 (bug 1619926)
Backed out changeset bc9d3e210fe7 (bug 1619926)
Backed out changeset 786164c461ae (bug 1619926)
Backed out changeset d89793e9d17d (bug 1619926)
Backed out changeset d665885bc912 (bug 1619926)
Backed out changeset 9260b6620943 (bug 1619926)
Backed out changeset af69a4896f2f (bug 1619926)
Backed out changeset b9cd6b7047b9 (bug 1612380)
2020-09-01 21:03:23 +03:00
Mark Banner f793b08aba Bug 1619926 - Remove distribution search directory provider definitions. r=daleharvey
Also remove DirectoryProvider as it is now unused.

Depends on D88018

Differential Revision: https://phabricator.services.mozilla.com/D88019
2020-08-31 16:34:24 +00:00
Toshihito Kikuchi 9b11b259f9 Bug 1654100 - Backed out changeset 6e556d9c0845. r=froydnj
Now that we've concluded no immediate action is needed for slow
ShellExecuteByExplorer, `SHELLEXECUTEBYEXPLORER_DURATION_MS` is
no longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D86143
2020-08-31 18:05:56 +00:00
Keefer Rourke 53c14a2428 Bug 1657663: Improve timestamp precision for nsLocalFileUnix r=froydnj,barret
This change updates the unix implementation of nsLocalFile
Set/GetLastModifiedTime methods to improve the precision of file modification
times from a 1 second resolution to a 1 millisecond resolution.

Differential Revision: https://phabricator.services.mozilla.com/D86238
2020-08-26 15:32:15 +00:00
Razvan Maries ff54551a34 Backed out 12 changesets (bug 1660328, bug 1660015, bug 1649595, bug 1649596, bug 1649593, bug 1659176, bug 1659839, bug 1659838, bug 1657663, bug 1657647, bug 1655460) for xpcshell perma failures. CLOSED TREE
Backed out changeset ff95badf90e3 (bug 1660328)
Backed out changeset a92f8525ab6f (bug 1659176)
Backed out changeset 8ca05470a0d5 (bug 1659839)
Backed out changeset 5de389b735d3 (bug 1649596)
Backed out changeset 73bdddd96664 (bug 1649595)
Backed out changeset 59800d609b55 (bug 1659838)
Backed out changeset 8aca41723313 (bug 1649593)
Backed out changeset dc0d90b3e135 (bug 1657647)
Backed out changeset e3dd5b6b4fbd (bug 1657663)
Backed out changeset f9c823fa14ba (bug 1657663)
Backed out changeset a5aecc7a6469 (bug 1655460)
Backed out changeset 21b64ef30e12 (bug 1660015)
2020-08-26 06:35:20 +03:00
Keefer Rourke c438dddf23 Bug 1657663: Improve timestamp precision for nsLocalFileUnix r=froydnj,barret
This change updates the unix implementation of nsLocalFile
Set/GetLastModifiedTime methods to improve the precision of file modification
times from a 1 second resolution to a 1 millisecond resolution.

Differential Revision: https://phabricator.services.mozilla.com/D86238
2020-08-24 15:41:07 +00:00
Simon Giesecke f77f8fd84c Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-21 09:54:48 +00:00
Bogdan Tara a904137456 Backed out changeset 0327b662a05f (bug 1659674) for nsStorageStream related central bustage CLOSED TREE 2020-08-20 02:58:41 +03:00
Simon Giesecke cfd7d0ea9c Bug 1659923 - Avoid unnecessary copies around Base64Encode. r=xpcom-reviewers,necko-reviewers,froydnj,valentin
This also adds some more variants of Base64Encode and Base64EncodeAppend.

Differential Revision: https://phabricator.services.mozilla.com/D87559
2020-08-19 17:45:16 +00:00
Simon Giesecke 0541f523d9 Bug 1659679 - Unify overflow handling in Base64.cpp encoding functions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87461
2020-08-19 10:52:25 +00:00
Simon Giesecke 9352526320 Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-19 14:39:03 +00:00
Simon Giesecke 55a58f0a61 Bug 847347 - Ensure that FileReader::GetAsDataURL does not trigger a release-mode assertion failure on large files. r=jstutte,froydnj
We avoid going through Substring which imposes a limit on the string length of
INT32_MAX and failing a MOZ_RELEASE_ASSERT otherwise.

This adds a new `Base64EncodeAppend` function that takes 8-bit char input and
produces 16-bit char output, and appends to an existing string, which is what
we need here to avoid doing a large copy. Base64EncodeHelper is generalized
to accomodate for that.

So in addition to fixing the defect, this also optimizes performance and
memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D87413
2020-08-19 08:11:42 +00:00
Simon Giesecke 6b1b0ed613 Bug 1659950 - Move instead of copy where possible in nsMultiplexInputStream::SerializeInternal. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87574
2020-08-19 12:46:26 +00:00
Razvan Maries abf299d7f6 Backed out changeset 60059f7d5c46 (bug 1657663) for perma failures on test_schema_change.js. CLOSED TREE 2020-08-10 22:55:35 +03:00
Keefer Rourke 148dabd639 Bug 1657663: Improve timestamp precision for nsLocalFileUnix r=froydnj,barret
This change updates the unix implementation of nsLocalFile
Set/GetLastModifiedTime methods to improve the precision of file modification
times from a 1 second resolution to a 1 millisecond resolution.

Differential Revision: https://phabricator.services.mozilla.com/D86238
2020-08-10 17:50:23 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Dimi Lee 73579c0490 Bug 1650768 - P3. Add .fileloc and .webloc file extensions to executable extension list r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D84474
2020-07-23 12:31:14 +00:00
Dimi Lee 9c4cc0a1ec Bug 1650768 - P2. Add .cer file extensions to executable extension list r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D84473
2020-07-23 12:31:06 +00:00
Dimi Lee 2799950e3b Bug 1650768 - P1. Add .accda, .accdb, .accde, and .accdr file extension to executable extension list r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D84472
2020-07-23 12:30:59 +00:00
Toshihito Kikuchi ab3b43d45a Bug 1654100 - Measure the elapsed time of ShellExecuteByExplorer. r=froydnj
This patch adds a new measurement to the histogram about the elapsed time
of `ShellExecuteByExplorer`.  If ShellExecuteByExplorer takes long in
a considerable number of instances, we need to consider fixing bug 1646986.

Differential Revision: https://phabricator.services.mozilla.com/D84407
2020-07-23 19:57:35 +00:00
Doug Thayer 8f54209ef6 Bug 1651165 - Rename idle service r=Gijs,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83413
2020-07-20 16:06:59 +00:00