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

20457 Коммитов

Автор SHA1 Сообщение Дата
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
Emilio Cobos Álvarez 80ac071f55 Bug 1665373 - Remove nsCountedRef. r=xpcom-reviewers,nika
It has no users after the previous patches.

Depends on D90400

Differential Revision: https://phabricator.services.mozilla.com/D90401
2020-09-17 00:50:56 +00:00
Emilio Cobos Álvarez b1d66c8b2e Bug 1611933 - Support infallible xpcom methods, and use it for nsIURI.schemeIs. r=nika,xpcom-reviewers
I've wanted to use this recently for a couple things. This uses the
same scheme and even templates we use for attributes, so it's mostly
moving code around...

Inverting the code generation so that the implementation is infallible,
and we actually generate the NS_IMETHOD goop inline somehow could be
potentially desirable, though that causes an extra virtual call for
non-C++ callers I guess, so maybe it's not such a great trade-off. Plus
it seems more complicated...

Explicitly forbid mixing infallible with notxpcom (as it doesn't make
sense), and similarly forbid infallible + returning void (as C++ doesn't
allow us to overload a function that differs only on its return type).

Differential Revision: https://phabricator.services.mozilla.com/D90044
2020-09-18 00:24:12 +00:00
Simon Giesecke 59cd4601d7 Bug 1663902 - Avoid gcc emitting lots of static constructors for UnusedZero<T&>::defaultValue. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D90359
2020-09-16 13:58:49 +00:00
Emilio Cobos Álvarez 47f53144a5 Bug 1665373 - Bail earlier if getting a null ref to NS_ReleaseOnMainThread. r=sg
This is just a minor optimization, not intended to change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D90398
2020-09-16 22:58:46 +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
Nika Layzell b2d811fc35 Bug 1658946 - Wrap non-wrappercached interfaces more precisely in ToJSValue, r=peterv
This will allow resolving DOM promises with non-wrappercached XPIDL interfaces
in a more convenient manner, as the wrapped JS object will have more concrete
interface information without needing to invoke QueryInterface.

Differential Revision: https://phabricator.services.mozilla.com/D87002
2020-09-14 19:30:56 +00:00
Nika Layzell e5976b05e4 Bug 1664526 - Support generics when implementing xpcom interfaces in Rust, r=emilio,kamidphish
When I originally wrote rust-xpcom support, it wasn't possible to implement
generic vtables in Rust. With updates and improvements to the language since
then, it is now possible to do, so this patch adds support for implementing
xpcom interfaces on generic structs.

All generic parameters to these structs are required to have a `'static`
lifetime bound, as it is not possible to safely represent xpcom interface
objects which contain internal non-'static references.

Differential Revision: https://phabricator.services.mozilla.com/D89950
2020-09-16 00:01:36 +00:00
Valentin Gosu 7de4c8009c Bug 1525854 - TRR shouldn't fallback to DNS on DNSSEC error r=necko-reviewers,dragana
This patch adds support for the Extended DNS Errors draft code.
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-extended-error-16

While not yet in the draft, it seems the OPT code for Extended DNS Error is 15
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11

The list of errors for which we hard fail isn't necessarily final.
I picked the errors that indicate a DNSSec failure, or an intentional
filtering done by the resolver.

Differential Revision: https://phabricator.services.mozilla.com/D87698
2020-09-15 10:39:07 +00:00
Razvan Maries c8e604eb78 Backed out 4 changesets (bug 1660970, bug 1525854, bug 1663657, bug 1645108) for perma failures on test_trr_additional_section.js. CLOSED TREE
Backed out changeset ad6c2e8af09b (bug 1663657)
Backed out changeset 419e26e3f452 (bug 1525854)
Backed out changeset 55bf856faf33 (bug 1660970)
Backed out changeset c543a3a008fa (bug 1645108)
2020-09-15 02:35:05 +03:00
Valentin Gosu 26af33d4cc Bug 1525854 - TRR shouldn't fallback to DNS on DNSSEC error r=necko-reviewers,dragana
This patch adds support for the Extended DNS Errors draft code.
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-extended-error-16

While not yet in the draft, it seems the OPT code for Extended DNS Error is 15
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11

The list of errors for which we hard fail isn't necessarily final.
I picked the errors that indicate a DNSSec failure, or an intentional
filtering done by the resolver.

Differential Revision: https://phabricator.services.mozilla.com/D87698
2020-09-14 21:42:02 +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
Alexis Beingessner e5dd298d13 Bug 1654807 - update thin-vec to 0.2.1 for potential endianess fix. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87019
2020-09-14 17:32:40 +00:00
Bas Schouten 343a7ab31c Bug 1661881 - Part 3: Make RefreshDriver's tick call SetInputHandlingStartTime directly. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89536
2020-09-14 12:13:13 +00:00
Bas Schouten 1dcbec6a4f Bug 1661881 - Part 2: Make InputTaskManager a global singleton. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89535
2020-09-14 12:12:06 +00:00
Bas Schouten 2594ec625f Bug 1661881 - Part 1: Factor InputTaskManager into its own file. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89534
2020-09-14 12:10:39 +00:00
Gerald Squelart 782cf5d3ad Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj
In most situations, JSONWriter users already know string lengths (either directly, or through `nsCString` and friends), so we should keep this information through JSONWriter and not recompute it again.
This also allows using JSONWriter with sub-strings (e.g., from a bigger buffer), without having to create null-terminated strings.

Public JSONWriter functions have overloads that accept literal strings.

Differential Revision: https://phabricator.services.mozilla.com/D86192
2020-09-14 02:33:20 +00:00
Nika Layzell c101f161b6 Bug 1664525 - Part 4: Various derive(xpcom) proc_macro style improvements, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D89949
2020-09-11 20:19:06 +00:00
Nika Layzell dfbf9d4094 Bug 1664525 - Part 3: Improve errors produced by #[derive(xpcom)], r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D89948
2020-09-11 20:19:04 +00:00
Nika Layzell 4e658d39b8 Bug 1664525 - Part 2: Use NonNull in xpcom RefPtr, r=emilio
Previously, this code used a &'static T in order to get the null pointer
optimization. Since the code was written, `NonNull` has been stabilized, and now
should be used instead.

Differential Revision: https://phabricator.services.mozilla.com/D89947
2020-09-11 20:19:02 +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 a087b2df35 Bug 1663554 - Convert AUTO_PROFILER_TEXT_MARKER_... to new AUTO_PROFILER_MARKER_TEXT - r=gregtatum
The name `AUTO_PROFILER_MARKER_TEXT` is more consistent with the equivalent non-`AUTO` macro, and similarly arguments have been re-ordered to be the same, i.e.: Name, category&options, text.

The different macros with different argument sets can now be collapsed into one macro, and the optional arguments (timing, inner window id, backtrace) can easily be added to the `MarkerOptions` where needed.

As a bonus, a specific start time can optionally be provided at construction time.

Differential Revision: https://phabricator.services.mozilla.com/D89588
2020-09-11 00:42:51 +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
Stefan Zabka ad4b2fd4e0 Bug 1663946 - Changed link to nsCOMPtr manual. r=froydnj DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D89616
2020-09-09 15:37:58 +00:00
Marco Zehe 8e98d90958 Bug 1657576 - Expose the data-at-shortcutkeys attribute as an object attribute, r=Jamie
Currently used mostly by Twitter and Facebook to allow them to specify which virtual quick navigation keys assistive technologies should not use when in those web applications, but instead pass them through to the browser. JAWS is currently the only known assistive technology making use of this feature.

This works in Chrome and the new Edge, but not in Firefox, because JAWS stopped using ISimpleDOM in Firefox, which no longer gave them access to this attribute.

This bug is to allow exposure of the non-standardized data-at-shortcutkeys attribute value via a same-named IAccessible2 and ATK Object Attribute.

Differential Revision: https://phabricator.services.mozilla.com/D86181
2020-09-09 05:43:19 +00:00
Simon Giesecke c79903419a Bug 1663613 - Add missing include directive in generated ErrorList.h. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D89432
2020-09-08 11:29:17 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Jeff Walden b5ec4c7eba Bug 1663365 - Create a new js/public/String.h header seeded with the inline string functions previously found in jsfriendapi.h. (More functions ought be added/moved here, but these make a good start.) r=jandem,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D89330
2020-09-08 22:50:52 +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
Sylvestre Ledru c320561565 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D89392
2020-09-08 04:32:00 +00:00
Simon Giesecke 8f8dc7744e Bug 1661242 - Declare nsCOMPtr_base::begin_assignment MOZ_ALWAYS_INLINE in release builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D89248
2020-09-03 14:45:09 +00:00
Simon Giesecke 2d21df0e59 Bug 1661428 - Support PackingVariant::NullIsOk also with non-trivially-default-constructible V. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88444
2020-09-03 14:14:41 +00:00
Chris Peterson 5a66ff2063 Bug 1662957 - Add [[nodiscard]] to xpcom's Mutex and Monitor TryLock() functions. r=xpcom-reviewers,sg
Depends on D89092

Differential Revision: https://phabricator.services.mozilla.com/D89093
2020-09-03 05:34:23 +00:00
Chris Peterson ac7932ab8d Bug 1662629 - Replace MOZ_MUST_USE with [[nodiscard] in xpcom. r=xpcom-reviewers,sg
The MOZ_MUST_USE macro is defined as clang's and gcc's nonstandard __attribute__((warn_unused_result)). Now that we compile as C++17 by default (bug 1560664), we can replace MOZ_MUST_USE with C++17's standard [[nodiscard]] attribute.

The [[nodiscard]] attribute must precede a function declaration's declaration specifiers (like static, extern, inline, or virtual). The __attribute__((warn_unused_result)) attribute does not have this order restriction.

Differential Revision: https://phabricator.services.mozilla.com/D89092
2020-09-02 09:18:12 +00:00
Emily McDonough 22fb22631b Bug 1662518 part 1 - Add semver to gkrust_util r=emilio
We will use this for CUPS version parsing.

Differential Revision: https://phabricator.services.mozilla.com/D89034
2020-09-02 23:49:02 +00:00
Nathan Froyd e199f12eb0 Bug 1662707 - add HasEmptyHeader function and use it in various nsTArray places; r=xpcom-reviewers,sg
One small step to removing that ugly `const_cast`.

Differential Revision: https://phabricator.services.mozilla.com/D89122
2020-09-02 17:42:56 +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
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
Razvan Maries a842c56a74 Backed out changeset 52ecdec7fb73 (bug 1662707) for perma failures on nsTArray. CLOSED TREE 2020-09-02 18:14:25 +03:00
Nathan Froyd 1ceeaca6f6 Bug 1662566 - make nsTSubstringSplit_Iter an STL forward iterator; r=xpcom-reviewers,sg
As long as we're following the STL guidelines on how to do iterators, we
should be annotating things with the bits that the STL iterator support
wants to see.

Differential Revision: https://phabricator.services.mozilla.com/D89042
2020-09-02 14:26:47 +00:00
Nathan Froyd 1fdcd48ad2 Bug 1662707 - add HasEmptyHeader function and use it in various nsTArray places; r=xpcom-reviewers,sg
One small step to removing that ugly `const_cast`.

Differential Revision: https://phabricator.services.mozilla.com/D89122
2020-09-02 14:18:55 +00:00
Razvan Maries e2dfb936e9 Backed out changeset 3c92e174f301 (bug 1662707) for build bustages on nsTArray.h. CLOSED TREE 2020-09-02 17:09:28 +03:00
Nathan Froyd e4edab469b Bug 1662707 - add HasEmptyHeader function and use it in various nsTArray places; r=xpcom-reviewers,sg
One small step to removing that ugly `const_cast`.

Differential Revision: https://phabricator.services.mozilla.com/D89122
2020-09-02 12:13:23 +00:00
Emilio Cobos Álvarez 03baee9d8a Bug 1662478 - Rename ::file-chooser-button to ::file-selector-button, and enable it in all channels. r=jwatt
See https://github.com/w3c/csswg-drafts/issues/5049

Differential Revision: https://phabricator.services.mozilla.com/D88995
2020-09-01 22:58:10 +00:00
Nathan Froyd b1cdc612da Bug 1243463 - make `sEmptyTArrayHeader` const; r=mccr8
We fixed what I think is the lone instance of writing into the (empty)
header in `SetLength` because it was causing TSan violations, so we should
be clear to make this `const`.  This change is not terribly effective on its
own (cf. the `const_cast` required to make this work at all), but in the
next patch, we can rig up `sEmptyTArrayHeader` to be surrounded with "guard
pages" and make rogue accesses off the array header a little more protected.

Differential Revision: https://phabricator.services.mozilla.com/D88657
2020-09-01 18:10:27 +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