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

1956 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Bryce Seager van Dyk 2f82080b18 Bug 1673917 - Rename vprintf style nsTSubstring::AppendPrintf -> AppendVprintf. r=sg
This patch also expands tests to check that the results of creating string via
both methods are consistent.

Differential Revision: https://phabricator.services.mozilla.com/D95053
2020-10-29 14:51:45 +00:00
Alexis Beingessner f045afd928 Bug 1506910 - Initialize the poison page with a static initializer. r=glandium,decoder
Poison was setup at the start of xpcom init when that was assumed to be early enough.
Since then, Poison was added to Maybe, and Maybe has been used everywhere, including in
our channel implementation. As a result, poison was being used before it was initialized.

This basically meant our poison pointers were being replaced with null instead, which
dances into some more UB than accessing a page we have actually allocated. Also, tsan
noticed that accesses to the value were racing with the initializer actually being
called!

A (dynamic) static initializer forces the poison initialization as we can reasonably
hope without getting CallOnce or singleton patterns involved.

Other changes:
  * Cleaned up the outdated documentation for mozWritePoison (the alignment
    restriction was removed in Bug 1414901)
  * Removed the poison supression from TSan

Differential Revision: https://phabricator.services.mozilla.com/D94251
2020-10-28 20:38:42 +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
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
Doug Thayer 71de614a1d Bug 1666310 - Enable IOInterposer on early beta r=aklotz
We want to collect information on late writes via telemetry. We have been
doing this in Nightly for a while now, but want to do so in beta/release. I
was actually initially unaware of this limitation of the IOInterposer, but
we need the IOInterposer to collect information on late writes, so I would
like to enable it for just early beta, in the hopes that we can catch any
late writes that may be happening, without adding a performance tax onto
release.

Accordingly, is perf the only reason that this was restricted to Nightly?
And if so, did we measure a perf difference, or was this just general
caution regarding the performance impact? Is there anything else to look
out for?

Differential Revision: https://phabricator.services.mozilla.com/D90894
2020-09-21 21:32:07 +00:00
Jean-Yves Avenard f713b4f58e Bug 1653060 - P2. Ensure the RDD process gets shutdown after content processes. r=mjf
The RDD process gets shutdown following a NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
Notifications are processed in LIFO order, since the RDD process is started on demand it would have typically be registered after a content process.
We must ensure that the RDD get shutdown after all content processes so that it can receive notifications that the RemoteDecoderManagerChilds are shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D90485
2020-09-18 11:07:18 +00:00
Brindusan Cristian 73323efa4b Backed out 4 changesets (bug 1653060) for causing mochitest assertion failures. CLOSED TREE
Backed out changeset d143ac59991f (bug 1653060)
Backed out changeset 6943102ffe2a (bug 1653060)
Backed out changeset a38425c96709 (bug 1653060)
Backed out changeset 68c5b2c56f3f (bug 1653060)
2020-09-18 14:03:48 +03:00
Jean-Yves Avenard 04f8c82986 Bug 1653060 - P2. Ensure the RDD process gets shutdown after content processes. r=mjf
The RDD process gets shutdown following a NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
Notifications are processed in LIFO order, since the RDD process is started on demand it would have typically be registered after a content process.
We must ensure that the RDD get shutdown after all content processes so that it can receive notifications that the RemoteDecoderManagerChilds are shutting down.

Differential Revision: https://phabricator.services.mozilla.com/D90485
2020-09-17 02:21:48 +00:00
Doug Thayer 025f5fb9f0 Bug 1656261 - Back out all recent StartupCache work r=RyanVM
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D90096
2020-09-14 17:00:53 +00:00
Nika Layzell 7b154ea902 Bug 1664525 - Part 1: Update various xpcom crates to rust2018, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D89946
2020-09-11 20:19:00 +00:00
Gerald Squelart 5f9ff13253 Bug 1663543 - Convert PROFILER_ADD_MARKER and 2-arg profiler_add_marker to PROFILER_MARKER_UNTYPED - r=gregtatum
Mostly mechanical change, with some extra work where non-literal names are provided.
Also, when this is the only profiler call in a file, `#include "GeckoProfiler.h"` can be changed to `#include "mozilla/ProfilerMarkers.h"`.

Differential Revision: https://phabricator.services.mozilla.com/D89415
2020-09-10 03:02:36 +00:00
Gijs Kruitbosch 8f276c24d2 Bug 1663424 - fix pgo file writing from non-webcontent child processes in PROFILE_GENERATE runs, r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D89467
2020-09-08 17:08:41 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Sylvestre Ledru 9c192aa9ca Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 09:23:02 +00:00
Mihai Alexandru Michis 261d01524b Backed out changeset d0f173a90792 (bug 1519636) for causing bustages.
CLOSED TREE
2020-08-31 10:14:58 +03:00
Sylvestre Ledru 939dd426e6 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 06:51:21 +00:00
Mike Hommey edd5d6a9a2 Bug 1658385 - Exclude mach_override code on aarch64 builds for now. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87385
2020-08-19 04:22:15 +00:00
Doug Thayer 66f210cc61 Bug 1656261 - Disable StartupCaching of Omnijar zip central r=froydnj
This is a speculative fix for a crash we're seeing due to xul.css ostensibly
not existing. The theory is that xul.css does in fact exist and the cached
zip central for the omnijar is simply corrupt in some way. If it is corrupt in
this way, then there is a bigger issue, and we need to investigate deeper.

However, the benefit of this approach is that it is a very small and contained
patch which should be simple to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D86829
2020-08-13 17:34:05 +00:00
Doug Thayer 4e1e2e3037 Bug 1657205 - Fallibly allocate for StartupCache from Omnijar r=froydnj
This changes the StartupCache::PutBuffer call from Omnijar to use a
fallibly allocated buffer, to reduce OOM crashes. We can/should broaden the
scope of this, but this is a simple initial change to mitigate the OOM
crashed introduced with bug 1627075.

Differential Revision: https://phabricator.services.mozilla.com/D86067
2020-08-07 20:05:59 +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
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Doug Thayer a8ad8e7325 Bug 1652140 - Check for null data from zip before trying to cache it r=froydnj
We're crashing occasionally here due to an assertion in Span.h. We would
also likely have problems down the road if we tried to cache nullptrs in
the startup cache. I think this is all we need to handle this as gracefully
as we are able - at least, this should make it so the recent StartupCache
changes are no longer making failure any less graceful.

Differential Revision: https://phabricator.services.mozilla.com/D83189
2020-07-14 15:36:09 +00:00
Kris Maglione 6a39211860 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 21:42:25 +00:00
Csoregi Natalia b355fcc4bf Backed out 6 changesets (bug 1464542) for xpcshell failures on test_Services.js. CLOSED TREE
Backed out changeset b50af9005851 (bug 1464542)
Backed out changeset 9d3a0ea2cf65 (bug 1464542)
Backed out changeset 71c3475fcbc2 (bug 1464542)
Backed out changeset 51ff93220a95 (bug 1464542)
Backed out changeset e84de1547c09 (bug 1464542)
Backed out changeset bbecc16d08eb (bug 1464542)
2020-07-09 23:19:26 +03:00
Kris Maglione d09458dc51 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 17:59:16 +00:00
Gerald Squelart 309270517d Bug 1651280 - Only use GetFileType(HANDLE) from NtCreateFile if that was successful - r=canaltinova
If the original `NtCreateFile()` call failed, the file handle may have been left untouched, and is therefore probably uninitialized or in another unusable state.

Differential Revision: https://phabricator.services.mozilla.com/D82647
2020-07-08 09:16:45 +00:00
Doug Thayer b274aafa4b Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-08 02:46:34 +00:00
Doug Thayer 3a305bb054 Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-08 02:44:13 +00:00
Doug Thayer 00ed10f38d Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-08 02:43:30 +00:00
Doug Thayer d9fd460e11 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-08 02:43:02 +00:00
Narcis Beleuzu a182c015f5 Backed out 6 changesets (bug 1627075) for bustages on startupcache/StartupCache.cpp . CLOSED TREE
Backed out changeset 21605186687e (bug 1627075)
Backed out changeset e29b15980da2 (bug 1627075)
Backed out changeset eb5265addd5e (bug 1627075)
Backed out changeset dfd71f4ecb81 (bug 1627075)
Backed out changeset 13ecd68b3c0d (bug 1627075)
Backed out changeset 333d035afe92 (bug 1627075)
2020-07-07 23:30:48 +03:00
Doug Thayer a2595a8402 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-07 17:04:27 +00:00
Doug Thayer 2046625fac Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-07 17:02:42 +00:00
Doug Thayer fafe31f134 Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-07 17:02:33 +00:00
Doug Thayer 7915db05b2 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-07 17:02:30 +00:00
Mihai Alexandru Michis 87cb0ad6fa Backed out 6 changesets (bug 1627075) for causing bustages in StartupCache.cpp
CLOSED TREE

Backed out changeset fc144caf5d06 (bug 1627075)
Backed out changeset a345e05df151 (bug 1627075)
Backed out changeset 288a67aed661 (bug 1627075)
Backed out changeset 2cb021a493d8 (bug 1627075)
Backed out changeset 920398d1c3d3 (bug 1627075)
Backed out changeset ebdcd96a9d20 (bug 1627075)
2020-07-07 08:47:14 +03:00
Doug Thayer e3f3b7b80b Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-07 04:36:27 +00:00
Doug Thayer 51a40f3027 Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-07 04:34:19 +00:00
Doug Thayer 7dcd89a08d Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-07 04:34:07 +00:00
Doug Thayer 5b755bb7f3 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-07 04:33:49 +00:00
Gerald Squelart 9de7e9a9b5 Bug 1640325 - Implement IOInterposeObserver::Observation::FileType() on Windows - r=canaltinova
Use `GetFileType(HANDLE)` on Windows.
Unlike `HandleToFilename`, `GetFileType` is fast enough that we don't need to use a `SmallArrayLRUCache` for it.

The pipe I/Os should not be visible anymore in the startup tests.

Differential Revision: https://phabricator.services.mozilla.com/D82303
2020-07-06 23:43:18 +00:00
Gerald Squelart 6447251c76 Bug 1640325 - FileIO markers show the type of file if known - r=canaltinova
Platform-specific observations will be able to specify a file type.
They will appear in distinct rows in the profiler.firefox.com Marker Chart.
The default type is "File", which is shown in markers as "FileIO" like before.

Differential Revision: https://phabricator.services.mozilla.com/D80399
2020-07-06 23:42:55 +00:00
Gerald Squelart f3b8c9b60a Bug 1529610 - LRU cache of Windows filenames in WinIOAutoObservation - r=canaltinova,florian
Caching filenames in 32-entry LRU array covers >95% of calls, and makes the average `Filename()` call 5 to 10 times cheaper.

browser_start_content_mainthreadio.js needed to be updated to handle operations that now have a filename thanks to the cache.

Since `ClearPoisonIOInterposer()` is never called (see bug 1647107), during Firefox shutdown we put LRUCache in a shutdown mode, which bypasses the cache in case it is still used at that time.

Differential Revision: https://phabricator.services.mozilla.com/D79767
2020-07-06 23:42:38 +00:00
Gerald Squelart 4e67253eee Bug 1529610 - SmallArrayLRUCache - r=canaltinova
A small LRU cache (i.e., evicting Least Recenty Used items) that's most optimized for most recently used items.

Differential Revision: https://phabricator.services.mozilla.com/D82302
2020-07-06 23:42:05 +00:00
Noemi Erli b13f2bcb47 Backed out 7 changesets (bug 1627075) for causing @nsZipArchive crashes CLOSED TREE
Backed out changeset 9705b2759d45 (bug 1627075)
Backed out changeset 699212a443c3 (bug 1627075)
Backed out changeset 7ae4df10749c (bug 1627075)
Backed out changeset ece9a4223349 (bug 1627075)
Backed out changeset 6c4eedaa0d04 (bug 1627075)
Backed out changeset f5106898239f (bug 1627075)
Backed out changeset b6029c7c0016 (bug 1627075)
2020-07-02 14:05:53 +03:00
Doug Thayer 3742aac030 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-02 02:51:41 +00:00
Doug Thayer 45d135813f Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-02 03:12:49 +00:00
Doug Thayer a336fc378c Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-02 02:49:49 +00:00
Doug Thayer 10f4af3f14 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-02 02:49:31 +00:00
Mihai Alexandru Michis bab20702a8 Backed out 6 changesets (bug 1627075) for causing failures regarding startupcache.
CLOSED TREE

Backed out changeset cf23b456ba12 (bug 1627075)
Backed out changeset b07887474f51 (bug 1627075)
Backed out changeset 65c0e6790a33 (bug 1627075)
Backed out changeset 6cd31f17a931 (bug 1627075)
Backed out changeset 0f0d1bd2a8ac (bug 1627075)
Backed out changeset 763a5a7b43a0 (bug 1627075)
2020-07-01 22:16:28 +03:00
Doug Thayer ab4b703a53 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-01 17:09:53 +00:00
Doug Thayer b52c9d39c1 Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-01 18:04:48 +00:00
Doug Thayer e1810ad0e8 Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-01 17:07:29 +00:00
Doug Thayer b19fd0dabb Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-01 17:07:17 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Butkovits Atila 44b8ac984c Backed out changeset e33817395845 (bug 1529610) as requested by dev. CLOSED TREE 2020-06-18 15:38:56 +03:00
Gerald Squelart 61581471a7 Bug 1529610 - LRU cache of Windows filenames in WinIOAutoObservation - r=canaltinova,florian
Caching filenames in 32-entry LRU array covers >95% of calls, and makes the average `Filename()` call 5 to 10 times cheaper.

browser_start_content_mainthreadio.js needed to be updated to handle operations that now have a filename thanks to the cache.

Differential Revision: https://phabricator.services.mozilla.com/D79767
2020-06-18 08:26:51 +00:00
Nicholas Nethercote a8f5f49b8a Bug 1645982 - Rename some service getters in `Services.py` to better match the types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79791
2020-06-16 23:32:21 +00:00
Emma Malysz c2ded60e72 Bug 1610134: revert late writes from nsTerminator. r=dthayer
After investigating the potential to reduce the nsTerminator's crash timeout from
1 min, to 20s, and then finally 40s, we have decided to this does not provide
significant gains to justify increasing the amount of shutdown hang crashes
and potential to lose data. We should maintain the crash timeout at 1 min.

Differential Revision: https://phabricator.services.mozilla.com/D77939
2020-06-04 19:18:21 +00:00
Bas Schouten 8032d4373e Bug 1606706 - Part 2: Integrate new TaskController code into tree and allow usage by pref. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74672
2020-06-04 00:02:18 +00:00
Bogdan Tara 2719f07eb0 Backed out 2 changesets (bug 1606706) for talos tests timeouts CLOSED TREE
Backed out changeset ab3e1a067a71 (bug 1606706)
Backed out changeset c47cf57dab71 (bug 1606706)
2020-06-03 11:51:04 +03:00
Bas Schouten 3a3972c388 Bug 1606706 - Part 2: Integrate new TaskController code into tree and allow usage by pref. r=smaug,?
Differential Revision: https://phabricator.services.mozilla.com/D74672
2020-06-02 11:36:38 +00:00
Nathan Froyd 02baef509b Bug 1641907 - add clarifying comments for AppInfoService getter(s); r=lina
People seemed to be taking the comment as indicative that Services.py
wasn't providing everything they needed, so make it clearer that you can
still get `nsIXULAppInfo`, you just have to work a little harder.

Differential Revision: https://phabricator.services.mozilla.com/D77477
2020-05-29 16:48:14 +00:00
Dan Minor 3c647c3f98 Bug 1638361 - Allow nsIUUIDGenerator to be used from socket process; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76706
2020-05-26 18:30:15 +00:00
Jean-Yves Avenard 38cfa9db61 Bug 1637890 - P4. Process events dispatched by destructors during shutdown. r=froydnj
We allow the last tasks dispatched during shutdown to be run rather than just leaking them.

Differential Revision: https://phabricator.services.mozilla.com/D75497
2020-05-19 06:06:18 +00:00
Jean-Yves Avenard de5872ee7a Bug 1637890 - P2. Don't use ClearOnShutdown to destroy AbstractThread::MainThread(). r=froydnj
During the last cycle collection, state watchers may attempt to dispatch tasks to the current AbstractThread, so we can't clear the TLS entry until that step has completed.

We want the object to be deleted last; ordering in call to ClearOnShutdown() can't guarantee it.

Differential Revision: https://phabricator.services.mozilla.com/D75498
2020-05-18 16:12:28 +00:00
Kershaw Chang 7922f6e91f Bug 1549323 - Make sure session cache is cleared in socket process r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D74906
2020-05-14 12:21:59 +00:00
Bob Owen c86a9b6e30 Bug 1632583: Only register taskbar button creation message in the parent process. r=aklotz
This also removes XRE_Win32kCallsAllowed and replaces its other use.

Differential Revision: https://phabricator.services.mozilla.com/D73909
2020-05-05 16:11:44 +00:00
Doug Thayer 51492737fb Bug 1630655 - Squash TSAN data race report in IOInterposer r=aklotz
In practice this shouldn't substantially change the behavior, but
it gets around being UB, and it shouldn't really cost us in terms
of performance. The alternative would be adding it to the TSAN
whitelist, which feels worse.

Differential Revision: https://phabricator.services.mozilla.com/D72015
2020-04-30 17:17:21 +00:00
Bobby Holley d90069e220 Bug 1631304 - Reject AbstractThread dispatches after the main thread has ceased event proccessing. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D72263
2020-04-28 21:18:19 +00:00
Peter Van der Beken 9a935f4bd4 Bug 1632802 - Remove nsAgg.h. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D72359
2020-04-27 07:56:04 +00:00
Mihai Alexandru Michis 74e71c6457 Backed out 3 changesets (bug 1630655) for causing failures in test_headless_screenshot.html
CLOSED TREE

Backed out changeset 939611f65438 (bug 1630655)
Backed out changeset 2e05e81cc858 (bug 1630655)
Backed out changeset bfb074351550 (bug 1630655)
2020-04-25 02:53:14 +03:00
Doug Thayer dfa7ab6aeb Bug 1630655 - Squash TSAN data race report in IOInterposer r=aklotz
In practice this shouldn't substantially change the behavior, but
it gets around being UB, and it shouldn't really cost us in terms
of performance. The alternative would be adding it to the TSAN
whitelist, which feels worse.

Differential Revision: https://phabricator.services.mozilla.com/D72015
2020-04-24 20:31:53 +00:00
Emma Malysz 044488a3af Bug 1610134: Part 1: add timeout pref that turns on late write checking to see if it's possible to crash browser earlier. r=dthayer,chutten
Differential Revision: https://phabricator.services.mozilla.com/D67884
2020-04-21 06:09:28 +00:00
Noemi Erli fbb1ea6c24 Backed out changeset d388b5f84158 (bug 1610134) for causing bustages in LateWriteChecks.cpp CLOSED TREE 2020-04-21 03:53:33 +03:00
Emma Malysz 592046ecf0 Bug 1610134: Part 1: add timeout pref that turns on late write checking to see if it's possible to crash browser earlier. r=dthayer,chutten
Differential Revision: https://phabricator.services.mozilla.com/D67884
2020-04-20 22:51:33 +00:00
Marco Bonardo 758aa4f647 Bug 1496578 - convert nsDefaultURIFixup to URIFixup.jsm. r=Gijs,farre
Differential Revision: https://phabricator.services.mozilla.com/D66579

--HG--
extra : moz-landing-system : lando
2020-04-08 11:30:14 +00:00
Razvan Maries 3b66f5f729 Backed out changeset b86e8f2cc5db (bug 1496578) for build bustages on nsDocShell.cpp. CLOSED TREE 2020-04-08 01:16:33 +03:00
Marco Bonardo 7457a384f2 Bug 1496578 - convert nsDefaultURIFixup to URIFixup.jsm. r=Gijs,farre
Differential Revision: https://phabricator.services.mozilla.com/D66579

--HG--
extra : moz-landing-system : lando
2020-04-07 21:55:24 +00:00
Andreas Farre 25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Sylvestre Ledru 0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D67574

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Kirk Steuber acc51b1485 Bug 1568994 - Add Update URL template to application.ini, XREAppData, and Services.appinfo r=glandium
This is being added to facilitate moving generation of the update URL to Rust (Bug 1567286). Once that has been completed, we should be able to remove the update URL from its current location in firefox.js so that it is not being duplicated in application.ini.

Differential Revision: https://phabricator.services.mozilla.com/D43300

--HG--
extra : moz-landing-system : lando
2020-03-26 00:57:13 +00:00
Bas Schouten 6458fb2f4f Bug 1563335 - Part 2: Add a pref for serializing all JS threads that access shared SABs. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D66953

--HG--
extra : moz-landing-system : lando
2020-03-26 00:29:48 +00:00
Dzmitry Malyshau 3f4ede670b Bug 1624594 - Check for memory leak env vars on crashing r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D68031

--HG--
extra : moz-landing-system : lando
2020-03-24 15:53:16 +00:00
Gabriele Svelto d3eaf3858d Bug 1622452 - Remove the remote exception handler when a content process shuts down r=froydnj
This works on all platforms with the exception of Linux where we remove the
exception handler only if the sandbox is disabled. With the sandbox enabled we
would have to whitelist sigaltstack() which breakpad uses to remove the
alternate signal stack which is not worth the fuss.

Besides this patch refactors the code that sets and unsets the exception
handler, cutting down on the duplication:

* The XRE_UnsetRemoteExceptionHandler() call is removed from XULAppAPI.h since it
  was no longer used
* The duplicate checks for the special strings used to disable the remote exception
  handler have been removed from CrashReporter::UnsetRemoteExceptionHandler()
  leaving them in the calling code
* The SetRemoteExceptionHandler() function was consolidated into only one
  piece of code with only one non-platform-specific shared prototype
* Some additional code was factored out to improve the readability

These changes pave the way both for bug 1614933 and for the oxidation of the
exception handler code.

Differential Revision: https://phabricator.services.mozilla.com/D67213

--HG--
extra : moz-landing-system : lando
2020-03-19 14:06:31 +00:00
Markus Stange aae2ad8790 Bug 1616400 - Do not recreate the inner reader for nested omni.ja archives if the Omnijar already has it. r=aklotz
This is already done for the outer nsJAR, but it wasn't done for the inner nsJAR.
(The omnijar is a nested zip archive on Android: the outer archive is the APK and the inner is the omnijar file.)
So we were re-using the file mapping but not the result of the uncompression.

Differential Revision: https://phabricator.services.mozilla.com/D63970

--HG--
extra : moz-landing-system : lando
2020-03-06 20:35:53 +00:00
Doug Thayer f6951a7a52 Bug 1615921 - Move lateWriteChecks earlier in shutdown r=froydnj
This moves the late write checking forward to before xpcom-shutdown-threads
in Nightly, and it turns it on for after the last cycle collection on
beta/release.

Differential Revision: https://phabricator.services.mozilla.com/D63215

--HG--
extra : moz-landing-system : lando
2020-02-24 17:54:09 +00:00
Doug Thayer ef59845575 Bug 1615921 - Suspend late write checks in Windows vprintf_stderr r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63216

--HG--
extra : moz-landing-system : lando
2020-02-21 18:51:37 +00:00
Mike Shal c8abdd68c2 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D63438

--HG--
extra : moz-landing-system : lando
2020-02-21 00:05:17 +00:00
Csoregi Natalia 6360b24e80 Backed out 2 changesets (bug 1616630) for Android bustage. CLOSED TREE
Backed out changeset 15016546c954 (bug 1616630)
Backed out changeset dcb7dc51633b (bug 1616630)
2020-02-20 21:24:11 +02:00
Mike Shal 39492660f4 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Depends on D63437

Differential Revision: https://phabricator.services.mozilla.com/D63438

--HG--
extra : moz-landing-system : lando
2020-02-20 16:21:55 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

Differential Revision: https://phabricator.services.mozilla.com/D62604

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

Differential Revision: https://phabricator.services.mozilla.com/D62604

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Kershaw Chang 583ae04d36 Bug 1607445 - Clear tokens cache at places where SSL_ClearSessionCache() is called r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D62021

--HG--
extra : moz-landing-system : lando
2020-02-18 19:04:28 +00:00
Mike Shal d8e4653d19 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D60919

--HG--
extra : moz-landing-system : lando
2020-02-14 13:22:46 +00:00
Cosmin Sabou ff39f9206d Backed out 2 changesets (bug 1613263, bug 1611326) for presummably causing l10n langpack bustages. a=backout
Backed out changeset 77e54e76848a (bug 1611326)
Backed out changeset 36ba18ac3a68 (bug 1613263)
2020-02-14 15:02:21 +02:00
Mike Shal ad0c283ab2 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D60919

--HG--
extra : moz-landing-system : lando
2020-02-13 23:07:04 +00:00
Brindusan Cristian e2fb6b8344 Backed out changeset 7fefed11f117 (bug 1611326) for build bustages at update-1.xpi.stub. CLOSED TREE 2020-02-13 23:33:34 +02:00
Mike Shal e6464dd404 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D60919

--HG--
extra : moz-landing-system : lando
2020-02-13 20:31:50 +00:00
Doug Thayer 615de231ee Bug 1607505 - Move StartupCache destructor later in shutdown r=froydnj a=reland CLOSED TREE
Since we've decoupled the writing of the StartupCache from the freeing
of the StartupCache's tables (which takes nontrivial time), this patch
moves the StartupCache's destructor later in shutdown so it will be
skipped in the early _exit(0) efforts. There is a remaining
WaitOnWriteThread in the StartupCache's destructor, but this is a
minor sanity check to avoid use-after-frees in the write thread during
shutdown. In general it won't matter as we already wait for the write
thread in the xpcom-shutdown observer, and if we shut down during write,
the system is set up to be okay with that (because it already happens).

Differential Revision: https://phabricator.services.mozilla.com/D62295

--HG--
extra : source : d79f1d283acde1a971fe0e5e6f1a8db075f8589a
extra : histedit_source : 32a2b4fec1fcf35960155b0f4280a38bcb54ec19
2020-02-12 19:03:29 +00:00
shindli cdd059e2c2 Backed out 2 changesets (bug 1607505) for causing xpcshell permafailures in netwerk/test/unit/test_alt-data_simple.js CLOSED TREE
Backed out changeset d79f1d283acd (bug 1607505)
Backed out changeset 7b7b147b6955 (bug 1607505)
2020-02-12 22:37:08 +02:00
Doug Thayer c03acee173 Bug 1607505 - Move StartupCache destructor later in shutdown r=froydnj
Since we've decoupled the writing of the StartupCache from the freeing
of the StartupCache's tables (which takes nontrivial time), this patch
moves the StartupCache's destructor later in shutdown so it will be
skipped in the early _exit(0) efforts. There is a remaining
WaitOnWriteThread in the StartupCache's destructor, but this is a
minor sanity check to avoid use-after-frees in the write thread during
shutdown. In general it won't matter as we already wait for the write
thread in the xpcom-shutdown observer, and if we shut down during write,
the system is set up to be okay with that (because it already happens).

Differential Revision: https://phabricator.services.mozilla.com/D62295

--HG--
extra : moz-landing-system : lando
2020-02-12 19:03:29 +00:00
Simon Giesecke 30984f7bab Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62543

--HG--
extra : moz-landing-system : lando
2020-02-12 11:13:33 +00:00
Cosmin Sabou d115a145d6 Backed out 2 changesets (bug 1607505) for causing bc leaks in browser_startupcache_telemetry.
Backed out changeset eb423c859513 (bug 1607505)
Backed out changeset db2b0b9a9886 (bug 1607505)

--HG--
extra : amend_source : fbcabe4b0dbda5d493ab988e97e727205986ba9d
2020-02-12 04:36:23 +02:00
Doug Thayer 586ab4d842 Bug 1607505 - Move StartupCache destructor later in shutdown r=froydnj
Since we've decoupled the writing of the StartupCache from the freeing
of the StartupCache's tables (which takes nontrivial time), this patch
moves the StartupCache's destructor later in shutdown so it will be
skipped in the early _exit(0) efforts. There is a remaining
WaitOnWriteThread in the StartupCache's destructor, but this is a
minor sanity check to avoid use-after-frees in the write thread during
shutdown. In general it won't matter as we already wait for the write
thread in the xpcom-shutdown observer, and if we shut down during write,
the system is set up to be okay with that (because it already happens).

Depends on D62294

Differential Revision: https://phabricator.services.mozilla.com/D62295

--HG--
extra : moz-landing-system : lando
2020-02-11 20:36:25 +00:00
David Major 41c425ab46 Bug 1613679 - Fix a misleading-indentation error in mach_override.c r=froydnj
Every day clang's warnings continue to amaze me. As does our ability to trigger them.

I'm assuming that this line was meant to go within the scope of the `if`, because if it were outside the scope, then we'd be duplicating the previous `fprintf`.

Differential Revision: https://phabricator.services.mozilla.com/D61835

--HG--
extra : moz-landing-system : lando
2020-02-06 16:39:02 +00:00
Doug Thayer 185e25fddf Bug 1606880 - Implement fast shutdown prefs r=froydnj
I originally had this as a few patches, but the work to fix test
failures and get the whole thing into a complete working state
quickly tangled them up. Apologies for that. To summarize what's
going on here, however:

- We introduce two prefs: shutdown.fastShutdownStage and
  shutdown.lateWriteChecksStage. The latter pref is set to 1, which
  will leave the existing late write checking behavior unchanged.
  However, we introduce this pref to make it simpler in the future
  to bump the late write checks window earlier in the shutdown cycle.
- We introduce an AppShutdown class, which will house static methods
  and a small amount of state for unifying some shutdown logic. Most
  importantly, it will now manage the state for app initiated restarts,
  as well as the logic for performing a safe fast shutdown.
- We refactored the existing restart code to call into the new
  AppShutdown file, so that if we are configured to actually perform
  a fast shutdown, we will be able to run the necessary restart logic
  immediately before doing so. Previously, the restart logic occurred
  later in the shutdown cycle than our late write checking, meaning
  if we were to simply exit the process at that point in time, we
  would never run the restart coe.
- Lastly, we updated two locations which called TerminateProcess and/or
  _exit(0) to call into the AppShutdown method (DoFastShutdown).

Differential Revision: https://phabricator.services.mozilla.com/D59196

--HG--
extra : moz-landing-system : lando
2020-01-29 12:29:43 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58175

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Andrea Marchesini 2616cac8b3 Bug 1030481 - Remove nsIMutable, r=smaug
nsIMutable is used only by DOM Blob/File. But Blobs are immutable by spec.
FileBlobImpl has a couple of lazy member values, but those are called when
the object is cloned in order to be sent to a different thread/process.

Differential Revision: https://phabricator.services.mozilla.com/D58946

--HG--
extra : moz-landing-system : lando
2020-01-07 15:02:00 +00:00
Brindusan Cristian ed883ce3f4 Backed out changeset 61101e3eebb3 (bug 1030481) for mochitest failures at test_file.xhtml. CLOSED TREE 2020-01-07 16:30:53 +02:00
Andrea Marchesini 4059db5bc7 Bug 1030481 - Remove nsIMutable, r=smaug
nsIMutable is used only by DOM Blob/File. But Blobs are immutable by spec.
FileBlobImpl has a couple of lazy member values, but those are called when
the object is cloned in order to be sent to a different thread/process.

Differential Revision: https://phabricator.services.mozilla.com/D58716

--HG--
extra : moz-landing-system : lando
2020-01-07 12:37:12 +00:00
Eric Rahm bf24e992e3 Bug 1241518 - Part 3: Switch various nsAutoPtr uses to UniquePtr in xpcom/ r=kmag
This converts straightforward `nsAutoPtr` usage over to `UniquePtr`.
`nsClassHashtable` is left alone for now as that will have a larger impact.
`nsThread` is left alone for now as it has non-trivial ownership concepts.

Differential Revision: https://phabricator.services.mozilla.com/D58284

--HG--
extra : moz-landing-system : lando
2020-01-07 00:06:05 +00:00
Eric Rahm 6d75492859 Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag
This removes various unused `#include "nsAutoPtr.h"` in `xpcom/`. Additionally
adds a few includes to the media stack.

Differential Revision: https://phabricator.services.mozilla.com/D58282

--HG--
extra : moz-landing-system : lando
2020-01-07 00:06:01 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Thinker Li 7cfdf6a788 Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

Differential Revision: https://phabricator.services.mozilla.com/D46884

--HG--
extra : moz-landing-system : lando
2019-12-05 00:02:40 +00:00
Thinker Li 0fcab03d24 Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878

--HG--
extra : moz-landing-system : lando
2019-12-05 00:03:29 +00:00
Bogdan Tara 3732e1f17c Backed out 6 changesets (bug 1470591) for test_punycodeURIs & test_nsIProcess* crashes CLOSED TREE
Backed out changeset 3ca19f8f388e (bug 1470591)
Backed out changeset f80db6e63169 (bug 1470591)
Backed out changeset cbac2d7dfe42 (bug 1470591)
Backed out changeset daad4d736ec0 (bug 1470591)
Backed out changeset ca1b804d404a (bug 1470591)
Backed out changeset a10772f780f7 (bug 1470591)
2019-12-04 00:53:14 +02:00
Thinker Li 035717ac2d Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

Differential Revision: https://phabricator.services.mozilla.com/D46884

--HG--
extra : moz-landing-system : lando
2019-12-03 19:08:10 +00:00
Thinker Li 70ef2f4abf Bug 1470591 - Part 1: Add a new process type for ForkServer. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D46878

--HG--
extra : moz-landing-system : lando
2019-12-03 18:53:53 +00:00
Andrew McCreight a102cb7648 Bug 1599521 - Add helper method for getting a string for the current process type. r=froydnj
I also removed the unused forward declaration of GMPLoader. It used to
be needed for the declaration of XRE_InitChildProcess.

Differential Revision: https://phabricator.services.mozilla.com/D54819

--HG--
extra : moz-landing-system : lando
2019-12-02 22:01:47 +00:00
Andrew McCreight d25c3b20ae Bug 1598787 - Rename XRE_ChildProcessTypeToString to XRE_GeckoProcessTypeToString. r=froydnj
This function works on all GeckoProcessTypes, not just those for child
processes.

Differential Revision: https://phabricator.services.mozilla.com/D54375

--HG--
extra : moz-landing-system : lando
2019-11-25 22:45:31 +00:00
Coroiu Cristina 0356c7a1b5 Backed out changeset 8f52344661fe (bug 1598787) for build bustages at build/src/tools/fuzzing/faulty/Faulty.cpp on a CLOSED TREE 2019-11-26 00:22:28 +02:00
Andrew McCreight b8c9932d5b Bug 1598787 - Rename XRE_ChildProcessTypeToString to XRE_GeckoProcessTypeToString. r=froydnj
This function works on all GeckoProcessTypes, not just those for child
processes.

Differential Revision: https://phabricator.services.mozilla.com/D54375

--HG--
extra : moz-landing-system : lando
2019-11-25 17:24:46 +00:00
Jan de Mooij 83d309574b Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D51061

--HG--
extra : moz-landing-system : lando
2019-11-22 12:40:17 +00:00
Andreas Tolfsen 4a8b5c26b8 bug 1543115: remote: expose nsIRemoteAgent as XPCOM service; r=remote-protocol-reviewers,maja_zf,nika
This change makes it possible to access the remote agent service
from C++ and Rust.

Differential Revision: https://phabricator.services.mozilla.com/D50288

--HG--
extra : moz-landing-system : lando
2019-11-22 08:03:19 +00:00
Aaron Klotz 72c46c09e0 Bug 1598098: Eradicate "using namespace mozilla;" from xpcom/build; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D54020

--HG--
extra : moz-landing-system : lando
2019-11-20 19:58:05 +00:00
Daniel Varga 420bc7e3b5 Backed out 9 changesets (bug 1543115) for build bustage with fatal error: 'nsIRemoteAgent.h' file not found. On a CLOSED TREE
Backed out changeset df184d5f766a (bug 1543115)
Backed out changeset 0316a7fa9d37 (bug 1543115)
Backed out changeset 99ae1cdbaa69 (bug 1543115)
Backed out changeset 825f6b55865a (bug 1543115)
Backed out changeset 6480cdbd004c (bug 1543115)
Backed out changeset 4ecb2e70e855 (bug 1543115)
Backed out changeset 76ebc0f74bff (bug 1543115)
Backed out changeset 8a931eb7b0c8 (bug 1543115)
Backed out changeset 72c162fff80c (bug 1543115)

--HG--
rename : remote/components.conf => remote/RemoteAgent.conf
2019-11-19 15:54:15 +02:00
Andreas Tolfsen 2cb1328cc1 bug 1543115: remote: expose nsIRemoteAgent as XPCOM service; r=remote-protocol-reviewers,maja_zf,nika
This change makes it possible to access the remote agent service
from C++ and Rust.

Differential Revision: https://phabricator.services.mozilla.com/D50288

--HG--
extra : moz-landing-system : lando
2019-11-19 12:32:51 +00:00
Andrew McCreight 04c213c0b4 Bug 1596244 - Report a fake leak instead of crashing if NSS fails to shut down. r=froydnj,keeler
Some kinds of leaks prevent NSS to not shut down properly, and right
now if that happens we crash. This interferes with our existing leak
checking code, so in this patch I make it not crash if we are already
leak checking. The failure is reported as a fake leak, so the test
should still fail when testing.

Differential Revision: https://phabricator.services.mozilla.com/D52914

--HG--
extra : moz-landing-system : lando
2019-11-14 14:51:53 +00:00
Randell Jesup 48ca7ca3d8 Bug 1572337: ensure MainThread is registered with the profiler properly r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D41619

--HG--
extra : moz-landing-system : lando
2019-11-08 21:07:29 +00:00
Razvan Maries cb87085ec4 Backed out 3 changesets (bug 1572337) ford perma fails. CLOSED TREE
Backed out changeset 00da7156d3fa (bug 1572337)
Backed out changeset 4eda65e054d8 (bug 1572337)
Backed out changeset ea6d5b4b038b (bug 1572337)
2019-11-07 17:29:46 +02:00
Randell Jesup 0be1d80429 Bug 1572337: ensure MainThread is registered with the profiler properly r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D41619

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:26 +00:00
Dorel Luca a0370f2bc4 Backed out changeset 955256297d6d (bug 1579367) for causing a top crash in Bug 1594404. a=backout 2019-11-06 23:19:09 +02:00
Jan de Mooij 96cc0b5247 Bug 1579367 - Initialize XPCJSContext explicitly, after loading user prefs. r=kmag
This way we get the correct values for start-up prefs in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D51061

--HG--
extra : moz-landing-system : lando
2019-11-05 06:29:13 +00:00
Martin Stransky b9873d666a Bug 1583466 - [Linux] Load policies per user from system, r=mkaply,mossop
Differential Revision: https://phabricator.services.mozilla.com/D46921

--HG--
extra : moz-landing-system : lando
2019-10-29 08:58:29 +00:00
Ehsan Akhgari 0fa91b9aa8 Bug 1591823 - Part 1: Remove the unused nsIComponentRegistrar.enumerateCIDs() method; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D50756

--HG--
extra : moz-landing-system : lando
2019-10-28 13:26:17 +00:00
Andreea Pavel a561dfcb8a Backed out changeset 6ac8599ebee3 (bug 1583466) for android build bustage at nsXREDirProvider.cpp on a CLOSED TREE 2019-10-26 01:50:06 +03:00
Martin Stransky 4334dfa913 Bug 1583466 - [Linux] Load policies per user from system, r=mkaply,mossop
Differential Revision: https://phabricator.services.mozilla.com/D46921

--HG--
extra : moz-landing-system : lando
2019-10-24 12:16:48 +00:00
Narcis Beleuzu d7b145656a Backed out changeset 6dde6dcea46a (bug 1583466) for bustages on nsXREDirProvider.cpp . CLOSED TREE 2019-10-24 15:10:12 +03:00
Martin Stransky 8197c0c37c Bug 1583466 - [Linux] Load policies per user from system, r=mkaply,mossop
Differential Revision: https://phabricator.services.mozilla.com/D46921

--HG--
extra : moz-landing-system : lando
2019-10-23 17:35:11 +00:00
Tom Ritter ff95dca4e6 Bug 1585373 - Re-enable PoisonIOInterposer for the mingw build r=dmajor
This was disabled in Bug 1441558 because it broke the mingw-gcc build.
But it doesn't break the mingw-clang build, and we don't support mingw-gcc
anymore, so we can re-enable it.

Differential Revision: https://phabricator.services.mozilla.com/D48645

--HG--
extra : moz-landing-system : lando
2019-10-09 14:53:36 +00:00
Ricky Stewart c010710916 Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=firefox-build-system-reviewers,mshal
(Same content as bad revision https://phabricator.services.mozilla.com/D48230, but with a very small change to config/external/icu/data/moz.build to fix the build breakage.)

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=833f6a69fcac689488a640b43e8e0bdaa086a56c

Differential Revision: https://phabricator.services.mozilla.com/D48409

--HG--
extra : moz-landing-system : lando
2019-10-07 21:15:19 +00:00
Daniel Varga 052ef806b5 Backed out changeset 8d95f2c8867b (bug 1586358) for build bustage with FATAL ERROR PROCESSING MOZBUILD FILE. On a CLOSED TREE
--HG--
extra : rebase_source : 325fbad2455afc7f693087e75fa57dba79f4d86b
2019-10-07 20:22:08 +03:00
Ricky Stewart 940d91af38 Bug 1586358 - Replace existing instances of GENERATED_FILES with references to the GeneratedFile template r=nalexander
This patch doesn't remove all references to GENERATED_FILES, but does remove most of them, leaving only those which can't be trivially translated to the new template.

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e4a25230c3992b9c5519ceb351fb37f6b2bf605e

Differential Revision: https://phabricator.services.mozilla.com/D48230

--HG--
extra : moz-landing-system : lando
2019-10-07 15:31:05 +00:00
Gijs Kruitbosch b4ce4fda42 Bug 1580282 - Remove checks for plugins that are part of extensions and support for loading plugins from the app and profile dir, r=mconley,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D45450

--HG--
extra : moz-landing-system : lando
2019-09-12 23:15:49 +00:00
Emilio Cobos Álvarez 0140a5576c Bug 1577439 - Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44217

--HG--
extra : moz-landing-system : lando
2019-09-09 22:39:46 +00:00
Gurzau Raul 9470d77271 Backed out changeset a396ec8f44fd (bug 1577439) for failing valgrind-test on a CLOSED TREE. 2019-09-07 19:03:27 +03:00
Emilio Cobos Álvarez d748b6062a Bug 1577439 - Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44217

--HG--
extra : moz-landing-system : lando
2019-09-05 19:18:27 +00:00
Gijs Kruitbosch e3898f89a1 Bug 1163079 - ensure we fetch app/profile dir information on the main thread in GeckoChildProcessHost r=jld,bryce,haik
Differential Revision: https://phabricator.services.mozilla.com/D42860

--HG--
extra : moz-landing-system : lando
2019-09-04 12:04:52 +00:00
Tom Ritter d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Razvan Maries 80cfb7b1f5 Backed out changeset 42ebd8a50978 (bug 1577439) for causing perma leakcheck | tab process: negative leaks caught. 2019-09-01 03:41:33 +03:00
Emilio Cobos Álvarez 5ba33267fa Bug 1577439 - Shutdown Servo's thread-pool in leak-checking builds, leak the atom table elsewhere. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44217

--HG--
extra : moz-landing-system : lando
2019-08-31 23:28:26 +00:00
Gabriele Svelto beb62c4c31 Bug 1282776 - Finalize crash reports for child process crashes happening too early r=froydnj
This changes the way crash reports for child processes happening too early
during the child process' startup. Before bug 1547698 we wrote a partial
.extra file with those crashes that lacked the process type. The user would
not be notified of those crashes until she restarted Firefox and even when
submitted those crashes would be erroneously labeled as browser crashes.

After bug 1547698 we stopped writing .extra files entirely for those crashes
which left orphaned .dmp files among the pending crash reports.

This patch does three things to improve the situation:

* It writes a partial .extra file so that the crashes are detected at the next
  startup. So the user is still not notified directly of these crashes but she
  can report them later.
* It adds the process type to the .extra file so that the crash reporters are
  labelled correctly.
* It fixes a leak in the `pidToMinidump` hash-map. Since the crashes were
  not finalized the `ChildProcessData` strucutre associated with them would
  never be fred.

Differential Revision: https://phabricator.services.mozilla.com/D40810

--HG--
extra : moz-landing-system : lando
2019-08-09 14:23:19 +00:00
Gabriele Svelto 53d4ac9807 Bug 1572565 - Make the remote sandbox broker process' telemetry string consistent r=jld
Differential Revision: https://phabricator.services.mozilla.com/D41291

--HG--
extra : moz-landing-system : lando
2019-08-09 00:03:33 +00:00
Tarek Ziadé a494b08766 Bug 1529022 - Add a GeckoChildProcessHosts iterator r=jld
Adds GeckoChildProcessHost::GetAll() and use it in ChromeUtils::GetProcInfo()

Differential Revision: https://phabricator.services.mozilla.com/D33920

--HG--
extra : moz-landing-system : lando
2019-06-21 01:33:47 +00:00
Oana Pop Rus 288befd88a Backed out changeset f79736d79ee1 (bug 1529022) for build bustages in GeckoChildProcessHost.cpp a=backout 2019-06-20 01:57:00 +03:00
Tarek Ziadé 2b03934b7d Bug 1529022 - Add a GeckoChildProcessHosts iterator r=jld
Adds GeckoChildProcessHost::GetAll() and use it in ChromeUtils::GetProcInfo()

Differential Revision: https://phabricator.services.mozilla.com/D33920

--HG--
extra : moz-landing-system : lando
2019-06-19 06:13:50 +00:00
Gurzau Raul 376affada3 Backed out changeset 11c118fa5f2b (bug 1529022) for build bustages at GeckoChildProcessHost.cpp a=backout 2019-06-19 09:07:19 +03:00
Tarek Ziadé 9f31044be3 Bug 1529022 - Add a GeckoChildProcessHosts iterator r=jld
Adds GeckoChildProcessHost::GetAll() and use it in ChromeUtils::GetProcInfo()

Differential Revision: https://phabricator.services.mozilla.com/D33920

--HG--
extra : moz-landing-system : lando
2019-06-18 16:36:52 +00:00
Gerald Squelart 19c0bac401 Bug 1556993 - Ignore invalid handles in Mozilla{,Un}RegisterDebugHandle - r=erahm
In particular, on Windows stdin/out/err may not be associated with a stream
(e.g., app without console window), in which case _get_osfhandle() returns -2.

Differential Revision: https://phabricator.services.mozilla.com/D34513

--HG--
extra : moz-landing-system : lando
2019-06-12 23:23:20 +00:00
Matt Woodrow 4908a84df2 Bug 1555891 - Merge PVideoDecoderManager into PRemoteDecoderManager. r=jya,jld
Differential Revision: https://phabricator.services.mozilla.com/D33586

--HG--
extra : moz-landing-system : lando
2019-06-11 02:01:34 +00:00
Gabriele Svelto 00782757b5 Bug 1047408 - Remove nsTWeakRef.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32319

--HG--
extra : moz-landing-system : lando
2019-05-23 20:16:23 +00:00
Gabriele Svelto f7b311b4a9 Bug 1547698 - Remove unused IPC methods for taking minidumps r=froydnj
This removes the XRE_TakeMinidumpForChild() which does not need to be
exposed anymore in the XUL API as well as
IToplevelProtocol::TakeMinidump() which was simply unused.

Differential Revision: https://phabricator.services.mozilla.com/D31062

--HG--
extra : moz-landing-system : lando
2019-05-14 14:06:19 +00:00
Myk Melez e2338641e4 Bug 1460811 - migrate XULStore to rkv r=bgrins,lina
Differential Revision: https://phabricator.services.mozilla.com/D25355

--HG--
rename : toolkit/components/xulstore/components.conf => toolkit/components/xulstore/tests/gtest/moz.build
extra : moz-landing-system : lando
2019-04-22 02:59:51 +00:00
Coroiu Cristina 5f4315f3ee Backed out changeset 37054e6d6bbb (bug 1460811) for marionette failures at marionette_harness/tests/unit/test_cli_arguments.py on a CLOSED TREE 2019-04-20 00:05:55 +03:00
Myk Melez 2eece48676 Bug 1460811 - migrate XULStore to rkv r=bgrins,lina
Differential Revision: https://phabricator.services.mozilla.com/D25355

--HG--
rename : toolkit/components/xulstore/components.conf => toolkit/components/xulstore/tests/gtest/moz.build
extra : moz-landing-system : lando
2019-04-19 17:42:48 +00:00
Razvan Maries 1f6c35708a Backed out changeset 2f8f0e53a7db (bug 1460811) for leakcheck perma failures. CLOSED TREE 2019-04-19 00:16:32 +03:00
Myk Melez f61d3b4399 Bug 1460811 - migrate XULStore to rkv r=bgrins,lina
Differential Revision: https://phabricator.services.mozilla.com/D25355

--HG--
rename : toolkit/components/xulstore/components.conf => toolkit/components/xulstore/tests/gtest/moz.build
extra : moz-landing-system : lando
2019-04-18 19:27:12 +00:00
Kirk Steuber 1b86be999a Bug 1520321 - Implement XPCOM interface for BITS r=lina
This patch introduces an asynchronous XPCOM interface for the bits client added in Bug 1523417

Differential Revision: https://phabricator.services.mozilla.com/D25161

--HG--
extra : moz-landing-system : lando
2019-04-15 19:44:35 +00:00
Sylvestre Ledru 7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D27245

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Michael Froman 0b07404bf5 Bug 1539029 - pt 1 - give RDD its own process selector. r=froydnj
Originally, RDD reused the GPU process selector since they were
using all the same services, and it reduced the number of places
that had to be touched.  Now that RDD needs pref handling, it
needs its own process selector to avoid GPU inheriting pref
handling.

Differential Revision: https://phabricator.services.mozilla.com/D26566

--HG--
extra : moz-landing-system : lando
2019-04-09 21:13:16 +00:00
Mike Hommey 071a2fe984 Bug 1541792 - Replace linker magic with manual component registration. r=froydnj
Before bug 938437, we had a rather large and error-prone
nsStaticXULComponents.cpp used to register all modules. That was
replaced with clever use of the linker, which allowed to avoid the mess
that maintaining that file was.

Fast forward to now, where after bug 1524687 and other work that
preceded it, we have a much smaller number of remaining static xpcom
components, registered via this linker hack, and don't expect to add
any new ones. The list should eventually go down to zero.

Within that context, it seems to be the right time to get rid of the
magic, and with it the problems it causes on its own.

Some of those components could probably be trivially be converted to
static registration via .conf files, but I didn't want to deal with the
possible need to increase the number of dummy modules in XPCOMInit.cpp.
They can still be converted as a followup.

Differential Revision: https://phabricator.services.mozilla.com/D26076

--HG--
extra : moz-landing-system : lando
2019-04-05 02:30:56 +00:00
Aaron Klotz 38457d2b92 Bug 1541130: Add XRE_GetChildProcBinPathType to nsXULAppAPI.h; r=froydnj,jld on a CLOSED TREE
The binary path type of a particular content process is useful information
outside of IPC. Given that `XRE_EnableSameExecutableForContentProc` already
exists, and given that the binary path type is closely related to
`GeckoProcessType`, I've added a new function, `XRE_GetContentProcBinPathType`.

The mapping of process type to binary type has been moved to the
`GeckoProcessTypes` definitions.

This patch also modifies `ipc::GeckoChildProcessHost` to call into the new
function.

Differential Revision: https://phabricator.services.mozilla.com/D25816

--HG--
extra : histedit_source : acdfd2357fd06551dff5286c6b7c56bd92dd347b
2019-04-09 00:45:24 +03:00
Andreea Pavel b7f98e54a5 Backed out changeset 8ef30ebad16c (bug 1541130) build bustages a=backout 2019-04-08 22:25:14 +03:00
Aaron Klotz e609e27b92 Bug 1541130: Add XRE_GetChildProcBinPathType to nsXULAppAPI.h; r=froydnj,jld
The binary path type of a particular content process is useful information
outside of IPC. Given that `XRE_EnableSameExecutableForContentProc` already
exists, and given that the binary path type is closely related to
`GeckoProcessType`, I've added a new function, `XRE_GetContentProcBinPathType`.

The mapping of process type to binary type has been moved to the
`GeckoProcessTypes` definitions.

This patch also modifies `ipc::GeckoChildProcessHost` to call into the new
function.

Differential Revision: https://phabricator.services.mozilla.com/D25816

--HG--
extra : moz-landing-system : lando
2019-04-08 18:19:06 +00:00
Daosheng Mu 0965abeaa7 Bug 1520339 - Part 2: handling memory reporting for VR process. r=kip,erahm
Differential Revision: https://phabricator.services.mozilla.com/D25321

--HG--
extra : moz-landing-system : lando
2019-04-02 05:13:17 +00:00
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D24168

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Boris Zbarsky 92f7b5dd5e Bug 1539716. Remove nsIHashable. r=froydnj
It's dead code.

Differential Revision: https://phabricator.services.mozilla.com/D25190

--HG--
extra : moz-landing-system : lando
2019-03-28 13:07:05 +00:00
Nicholas Nethercote a955ca9592 Bug 1535226 - Remove uses of XP_WIN32 in Gecko. r=glandium
The definitions can't be entirely removed yet because NSS still needs them.

Differential Revision: https://phabricator.services.mozilla.com/D23454

--HG--
extra : moz-landing-system : lando
2019-03-21 01:28:50 +00:00
Boris Zbarsky 10d7ccf23e Bug 1535384 part 5. Eliminate MOZ_CAN_RUN_SCRIPT_BOUNDARY for mutation callbacks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23776

--HG--
extra : moz-landing-system : lando
2019-03-19 15:14:11 +00:00
Mark Goodwin 50887394d6 Bug 1429796 Cleanup storage in CertBlocklist to allow easy addition of new types of pair (e.g. whitelist entries) r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D17668

--HG--
extra : moz-landing-system : lando
2019-03-20 17:00:47 +00:00
Andreea Pavel c3cd918c5c Backed out 2 changesets (bug 1429796) for failing xperf on a CLOSED TREE
Backed out changeset b0d08863f7a5 (bug 1429796)
Backed out changeset 1bd54f8dfd9e (bug 1429796)
2019-03-20 00:03:49 +02:00
Mark Goodwin 59e0c373c3 Bug 1429796 Cleanup storage in CertBlocklist to allow easy addition of new types of pair (e.g. whitelist entries) r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D17668

--HG--
extra : moz-landing-system : lando
2019-03-19 17:48:04 +00:00
Chris Peterson 3f655a7340 Bug 1534878 - xpcom: Rename NS_InitXPCOM2() to NS_InitXPCOM(). r=froydnj
--HG--
extra : rebase_source : 6e7a46cf49f78e46e12d1e7fc76aba6f0c377be0
2019-03-14 23:38:09 -07:00
Chris Peterson e05a724277 Bug 1534878 - xpcom: Remove unused function NS_InitXPCOM(). r=froydnj
NS_InitXPCOM() is currently not called in Gecko. It has been a one-line wrapper around NS_InitXPCOM2() since the year 2000 (bug 46320), presumably to maintain ABI compatibility for third-party users of XPCOM. We no longer need to worry about XPCOM ABI compatibility.

https://searchfox.org/mozilla-central/commit/cddb62593d786e0ff12b25037c74b01cb1a802e5

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

xpcom/build/XPCOMInit.cpp:187:1 [-Wmissing-prototypes] no previous prototype for function 'NS_InitXPCOM'

Differential Revision: https://phabricator.services.mozilla.com/D23266

--HG--
extra : rebase_source : 0ad5580e2978a8d5141bd6a9623c5af7359c78ca
extra : source : a9e4205868dbb847c01980051a56e99ad24a8ac1
2019-02-24 16:48:33 -08:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Chris Pearce de686d23c1 Bug 1530245 - Launch sandbox from new remote sandbox broker process. r=jld,bobowen
Depends on D22051

Differential Revision: https://phabricator.services.mozilla.com/D22052

--HG--
extra : moz-landing-system : lando
2019-03-13 09:24:52 +00:00
Florian Quèze f80db303bd Bug 1533775 - PoisonIOInterposerWin should report the filename when opening non-existant files, r=aklotz.
Differential Revision: https://phabricator.services.mozilla.com/D22722

--HG--
extra : moz-landing-system : lando
2019-03-08 17:15:21 +00:00
Florian Quèze 7d2f09a8e3 Bug 1533531 - Make NSPRIOInterposer report filenames, r=aklotz.
Differential Revision: https://phabricator.services.mozilla.com/D22585

--HG--
extra : moz-landing-system : lando
2019-03-08 12:28:12 +00:00
Aaron Klotz 0d71623b50 Bug 1531030: Use MOZ_DISABLE_POISON_IO_INTERPOSER to disable PoisonIOInterposer when it is unsafe to initialize; r=erahm
If we are running a background thread in the launcher process to log failures,
then allowing the main thread to proceed with monkeypatching system calls is a
Bad Idea. This patch gives us an environment variable that, when set, indicates
that it is unsafe for PoisonIOInterposer to run.

This scenario is an uncommon one, but one that we must account for nonetheless.

Differential Revision: https://phabricator.services.mozilla.com/D21607

--HG--
extra : moz-landing-system : lando
2019-03-01 19:34:54 +00:00
Ryan Hunt f4a515c179 Bug 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21131

--HG--
extra : rebase_source : 514f36238d908de221a0116f8e8a5d0cf18a168c
extra : histedit_source : 85743d2586a7307738866ce145b93dae2a664cf3
2019-02-25 16:14:01 -06:00
Honza Bambas 3b626a1544 Bug 1527827 - Add ShutdownPhase::ShutdownCycleCollector triggered after the CycleCollector shutdown, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21047

--HG--
extra : moz-landing-system : lando
2019-02-27 12:57:11 +00:00