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

21084 Коммитов

Автор SHA1 Сообщение Дата
David Parks 4e9ed60079 Bug 1682030 - Remove Windows NPAPI plugin proccess sandbox r=bobowen
Removes Windows NPAPI process sandboxing code, including the code to establish a viable temp directory that was accessible by the sandboxed process.

Differential Revision: https://phabricator.services.mozilla.com/D108688
2021-04-05 23:48:43 +00:00
David Parks f7c49caeef Bug 1682030 - Remove NPAPI overlay from JS Plugin actors r=Gijs
Removes NPAPI support from JS plugin actors, most of which was CTP-and-fallback overlay related, leaving them to only do GMP crash handling.

Differential Revision: https://phabricator.services.mozilla.com/D107157
2021-04-05 23:48:42 +00:00
David Parks 0e34d4d48b Bug 1682030 - Remove NPAPI blocklisting r=Gijs,jmathies,mixedpuppy
Removes the PluginProvider and NPAPI plugin blocklist handling as part of removing all NPAPI support.  This allows us to remove nsIPluginHost.

Differential Revision: https://phabricator.services.mozilla.com/D107148
2021-04-05 23:48:38 +00:00
Emilio Cobos Álvarez 5ddee7313f Bug 1698132 - Convert proton pref checks from @supports rules to media features. r=Gijs
This means that dynamic changes will be handled correctly, we can use
StaticPrefs, etc.

Differential Revision: https://phabricator.services.mozilla.com/D110816
2021-04-05 20:48:05 +00:00
Nika Layzell 87810a2b88 Bug 1702245 - Expand XPCOM's in-tree documentation, r=xpcom-reviewers,kmag
This change involved migrating a number of pages, including the DMD
documentation, XPIDL documentation, and the Internal String Guide to
Firefox Source Docs, as well as performing a review/update to these
documents to be more accurate and current.

In addition, some additional sections were written in the various
documents to elaborate on important features which were not present when
the documents were originally written, and a few new documents were
written to add basic documentaiton for other XPCOM components.

The following MDN pages were migrated in this patch:

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPIDL
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Guide/Internal_strings
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/DMD

Differential Revision: https://phabricator.services.mozilla.com/D110424
2021-04-05 15:56:18 +00:00
Nick Alexander 166dfa51ee Bug 1700850 - Part 2: Remove temporary background profile directories very late. r=dthayer
When `--backgroundtask TASK` invocations exit, they try to remove
their temporary profile directory.  This mostly works, except there
are some very late writes to the profile directory including
`Telemetry.ShutdownTime.txt` and the `security_state` directory.  This
commit accommodates by moving the profile directory removal even
later.  It might be possible to instead avoid these very late writes,
but that is hard in general, and is more likely to depend on the exact
code invoked by the background task itself.

Differential Revision: https://phabricator.services.mozilla.com/D110472
2021-04-05 04:16:37 +00:00
Toshihito Kikuchi 29312fb769 Bug 1586236 - Use memory resource notifications to detect low memory scenarios on Windows. r=gsvelto
This patch uses the low memory resource notification facility to detect
scenarios where physical memory is running low without polling. This is a
significant change compared to the previous behavior which measured both
available virtual memory (only on 32-bit builds) and available commit space.

Since we're not trying to avoid OOMs anymore we don't save memory reports
anymore when hitting a low-memory condition.

Differential Revision: https://phabricator.services.mozilla.com/D110354
2021-03-31 15:18:05 +00:00
Kagami Sascha Rosylight b046eaa662 Bug 1701789 - Restore UserProximityEvent r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110172
2021-03-30 20:44:47 +00:00
Bob Owen 3155e74038 Bug 1697344 p1: Make GradientCache thread safe. r=jrmuizel
This is so that we can use it in the canvas worker threads.
It also sets a maximum number of entries because on Windows the associated
Direct2D objects can be fairly big.

Differential Revision: https://phabricator.services.mozilla.com/D109790
2021-03-29 12:12:20 +00:00
Kris Maglione 35305e871d Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.

Differential Revision: https://phabricator.services.mozilla.com/D103210
2021-03-25 19:47:01 +00:00
Jens Stutte 288171e26c Bug 1699983: Avoid firing unexpected shutdown observer notification in content process. r=kmag,xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109675
2021-03-25 18:07:57 +00:00
Simon Giesecke a598a0c7c5 Bug 1679522 - Use <> style for including windows system headers. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98895
2021-03-25 10:19:44 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Simon Giesecke 1cfa7f12c5 Bug 1692403 - Don't shrink hashtable in EntryHandle destructor. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108171
2021-03-25 08:34:32 +00:00
Agi Sferro 66b035f4a2 Bug 1567341 - Add outFile, errFile parameters to XREShellData. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D106201
2021-03-24 21:49:34 +00:00
Alexandru Michis 497409d76e Backed out 24 changesets (bug 1567341) for causing xpcshell failures in test_telemetry.js
CLOSED TREE

Backed out changeset deb795c7d0ed (bug 1567341)
Backed out changeset 62d24a3e5e33 (bug 1567341)
Backed out changeset 1185cabd94e0 (bug 1567341)
Backed out changeset 73a4ae419261 (bug 1567341)
Backed out changeset b6eb111329f3 (bug 1567341)
Backed out changeset 0dc0bfedc042 (bug 1567341)
Backed out changeset 9dca635e41d7 (bug 1567341)
Backed out changeset c34928580933 (bug 1567341)
Backed out changeset f9ba384bb407 (bug 1567341)
Backed out changeset ec25c2df380e (bug 1567341)
Backed out changeset 9e8ea542b51e (bug 1567341)
Backed out changeset 3dc62863a028 (bug 1567341)
Backed out changeset 6c104f865540 (bug 1567341)
Backed out changeset c422ca4207ea (bug 1567341)
Backed out changeset e3df748ed62f (bug 1567341)
Backed out changeset 9d1f27796a97 (bug 1567341)
Backed out changeset 1d93ba23f809 (bug 1567341)
Backed out changeset 55652f6af6ed (bug 1567341)
Backed out changeset 9fb892955a88 (bug 1567341)
Backed out changeset 1cdd95c43416 (bug 1567341)
Backed out changeset 5a839d5e3e33 (bug 1567341)
Backed out changeset ea84b5749a27 (bug 1567341)
Backed out changeset dcb1ae146475 (bug 1567341)
Backed out changeset d72accc274ac (bug 1567341)
2021-03-24 23:37:43 +02:00
Agi Sferro 67dbfc480e Bug 1567341 - Add outFile, errFile parameters to XREShellData. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D106201
2021-03-24 20:19:56 +00:00
Simon Giesecke cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke 15d3d060cf Bug 1184468 - Use nsTHashtable::Keys where possible in netwerk. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106950
2021-03-24 17:51:12 +00:00
Simon Giesecke 5b5b39393f Bug 1184468 - Add To(T)Array functions that materialize a range into an array. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109056
2021-03-24 17:51:11 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke 8aaa3daac8 Bug 1184468 - Use nsTHashtable::Keys where possible in netwerk. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106950
2021-03-24 16:58:57 +00:00
Simon Giesecke 5a92e6d185 Bug 1184468 - Add To(T)Array functions that materialize a range into an array. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109056
2021-03-24 16:58:56 +00:00
Emilio Cobos Álvarez 8b97179d90 Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

We have to add width: 100% to the UA sheet because we don't get it
automatically set to the scrollport size to by the scrollport anymore.
Otherwise this would regress vertical writing-modes.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-24 11:21:14 +00:00
Gerald Squelart 2400d86309 Bug 1700498 - nsTSetInserter::operator* returns a proxy - r=sg
Previously `operator*` returned the iterator, and the templated `operator=` would handle the value insertion.
However that `operator=` prevented a defaulted copy-assignment operator, which is used in some algorithms to overwrite the iterator itself.
So now `operator*` returns a proxy, which implements the templated `operator=` that is used to insert a value. This allows the nsTSetInserter to have a its defaulted `operator=`.

Side-effect: `E` (the hash's KeyClass) is not needed anymore in nsTSetInserter, so it's only templated on the set type.

Tech note: `std::back_insert_iterator` doesn't use a value, but has explicitly-defined `operator=(const typename Container::value_type&)` and  `operator=(typename Container::value_type&&)`. Unfortunately, some of our stored value types are references (e.g.: `nsStringHashKey::KeyType` is `const nsAString&`), which, due to reference collapsing, would have made both `operator=`'s have the same signature! That's why this implementation uses a proxy sub-type with a single templated `operator=` that can handle anything.

Differential Revision: https://phabricator.services.mozilla.com/D109587
2021-03-24 10:25:23 +00:00
Csoregi Natalia 024e0b2323 Backed out 10 changesets (bug 1581859) for causing hazard failures. CLOSED TREE
Backed out changeset 93fe6801a5e2 (bug 1581859)
Backed out changeset 0a33cb185fb3 (bug 1581859)
Backed out changeset 9ceaad6dab5b (bug 1581859)
Backed out changeset ee611f0839ca (bug 1581859)
Backed out changeset 4199963fe477 (bug 1581859)
Backed out changeset b4c5ace21b9e (bug 1581859)
Backed out changeset 6003469dc449 (bug 1581859)
Backed out changeset 826c62b783c0 (bug 1581859)
Backed out changeset e1d7851295fd (bug 1581859)
Backed out changeset 9796577af27a (bug 1581859)
2021-03-24 08:48:00 +02:00
Butkovits Atila 6cc3507063 Backed out 3 changesets (bug 1700472) for causing reftest failures.
Backed out changeset df4d74e9669f (bug 1700472)
Backed out changeset ec476bf43984 (bug 1700472)
Backed out changeset 168b31448423 (bug 1700472)
2021-03-24 03:12:44 +02:00
Kris Maglione 4abddadf18 Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.

Differential Revision: https://phabricator.services.mozilla.com/D103210
2021-03-23 23:57:10 +00:00
Emilio Cobos Álvarez 966d0f4dfc Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-23 22:31:08 +00:00
Gijs Kruitbosch d2f0e414a7 Bug 1690245 - tests for NTFS special paths, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D103768
2021-03-23 14:12:40 +00:00
Simon Giesecke ae75c3faa8 Bug 1601556 - Make Result<V, E> a literal type if V and E are literal types and PackingStrategy is not Variant. r=emilio
Also make CompactPair<A, B> a literal type if A and B are literal types,
and add MaybeStorageBase that ought to be used as a basis of MaybeStorage
in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D55930
2021-03-23 12:35:19 +00:00
Tom Schuster 01d4cafbb1 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-23 11:15:11 +00:00
Simon Giesecke 810d88095a Bug 708901 - Migrate to nsTHashSet in xpcom. r=xpcom-reviewers,kmag
Depends on D109326

Differential Revision: https://phabricator.services.mozilla.com/D109327
2021-03-23 10:36:39 +00:00
Simon Giesecke e5674e128d Bug 708901 - Add nsTHashSet. r=xpcom-reviewers,nika
Depends on D109276

Differential Revision: https://phabricator.services.mozilla.com/D107684
2021-03-23 10:36:31 +00:00
Jens Stutte 8560eb86e8 Bug 1690326: Map Windows error 0x570 ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED r=xpcom-reviewers,janv,nika
While NS_ERROR_FILE_CORRUPTED already exists, it indicates most of the times more a parsing problem of a given file format.
But Windows ERROR_FILE_CORRUPTED signals a malfunctioning or corrupted file system at OS level, thus we translate it to the new
NS_ERROR_FILE_FS_CORRUPTED.

There seems to be no suitable errno under POSIX to map here.

Differential Revision: https://phabricator.services.mozilla.com/D108793
2021-03-23 10:29:02 +00:00
Cosmin Sabou 7eba371387 Backed out 10 changesets (bug 1581859) for causing hazard failures on ExtensionsParent.cpp.
Backed out changeset 6020ec7d7f32 (bug 1581859)
Backed out changeset 07901e457839 (bug 1581859)
Backed out changeset e23389fc98b5 (bug 1581859)
Backed out changeset 4287eebc2c77 (bug 1581859)
Backed out changeset eeff6f501cfc (bug 1581859)
Backed out changeset 22db36f7d16d (bug 1581859)
Backed out changeset 16831d45d0ed (bug 1581859)
Backed out changeset 816643de7694 (bug 1581859)
Backed out changeset 6fd5aa7895e3 (bug 1581859)
Backed out changeset 2b68d2eee18e (bug 1581859)
2021-03-23 05:48:27 +02:00
Bogdan Tara a3fae8602d Backed out 3 changesets (bug 1536094) for causing bug 1700228 CLOSED TREE
Backed out changeset 464143c2b6ac (bug 1536094)
Backed out changeset 3462cb6573b1 (bug 1536094)
Backed out changeset d566c1c9e82f (bug 1536094)
2021-03-23 00:46:34 +02:00
Cosmin Sabou 03b3f8984e Merge mozilla-central to autoland. 2021-03-23 00:05:36 +02:00
Mike Hommey 4d8e18962b Bug 1699375 - Move WalkTheStack to mozglue. r=nika
A long standing issue is that MOZ_ASSERT and related don't print stack
traces in debug builds when they're directly or indirectly emitted from
non-libxul code. Moving WalkTheStack to mozglue alleviates the problem.

It's also not printing stack traces when emitted from C code (and for
some C third party libraries, we do redirect assert to MOZ_ASSERT),
which we solve by making the corresponding API available without C++
(which WalkTheStack being a static method of the nsTraceRefCnt class
didn't allow, or the use of a closure on Android).

This requires some adjustements to headers that indirectly assume that
Assertions.h includes ErrorList.h through nsError.h through nscore.h
through nsTraceRefcnt.h.

We also remove TestStackCrawl.cpp because it hasn't been built since
bug 158528, 19 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D108913
2021-03-22 21:25:30 +00:00
Mike Hommey 9f69fef1e9 Bug 1699375 - Make MozFormatCodeAddress* return the printed size, and use that instead of strlen. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D108912
2021-03-22 21:25:30 +00:00
Kris Maglione 136038c0cb Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.

Differential Revision: https://phabricator.services.mozilla.com/D103210
2021-03-22 20:12:15 +00:00
Kagami Sascha Rosylight 24e9b29c8d Bug 1699707 - Remove DeviceProximityEvent and UserProximityEvent r=agi,annevk,smaug
Note that this removes `window.ondeviceproximity` and `window.onuserproximity` which unexpectedly have been exposed unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D109160
2021-03-22 18:16:16 +00:00
Tom Schuster bcb6e45e17 Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Cosmin Sabou cac540c776 Backed out 3 changesets (bug 1536094) for causing valgrind failures.
Backed out changeset dfe051a9c91a (bug 1536094)
Backed out changeset c73979442002 (bug 1536094)
Backed out changeset 863933e887e8 (bug 1536094)
2021-03-22 20:34:36 +02:00
Florian Quèze 8ad1e5d0aa Bug 1699742 - Remove MOZ_GECKO_PROFILER ifdefs that are no longer needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D109078
2021-03-22 16:29:52 +00:00
Tom Schuster aa320997de Bug 1536094 - Support dynamic import from content scripts (sandboxed code) r=smaug,jonco
Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.

Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.

To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.

Differential Revision: https://phabricator.services.mozilla.com/D107076
2021-03-22 16:22:27 +00:00
Steve Fink c8b4a27dc9 Bug 1698172 - Add descriptions to GC markers r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D108249
2021-03-22 16:00:52 +00:00
Simon Giesecke 3dfd3cf4dc Bug 1698871 - Add SafeRefPtr support to nsBaseHashtable. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D108658
2021-03-22 15:18:35 +00:00
smolnar 20bfecac32 Backed out 2 changesets (bug 1698871) backed out for causing mochitest and xpc failures in SafeRefPtr. CLOSED TREE
Backed out changeset 1c617ab7df90 (bug 1698871)
Backed out changeset c3605f06194b (bug 1698871)
2021-03-22 16:40:12 +02:00
Simon Giesecke d06dde5f0e Bug 1698871 - Add SafeRefPtr support to nsBaseHashtable. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D108658
2021-03-22 13:23:42 +00:00
Gerald Squelart 9250fa99a8 Bug 1699923 - Revert changes to nsTArrayBackInserter::operator=. r=gerald,masayuki a=bustage-fix DONTBUILD
The changes to nsTArrayBackInserter::operator= broke the builds on Windows
under some circumstances. This reverts those changes. Necessary adaptations
in the stack are made in later patch.

Differential Revision: https://phabricator.services.mozilla.com/D109276
2021-03-22 09:11:03 +00:00
Mozilla Releng Treescript faaf83f9f7 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2021-03-22 15:15:18 +00:00
Simon Giesecke cbcae47d96 Bug 1184468 - Add nsBaseHashtable::Values function to get a STL-style range of values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108586
2021-03-19 17:27:28 +00:00
Simon Giesecke 3206cac123 Bug 1184468 - Add nsTHashtable::Keys function to get a STL-style range of keys. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106949
2021-03-19 17:27:28 +00:00
Kagami Sascha Rosylight 9441435604 Bug 1699332 - Remove remaining presentation URL references r=annevk
Differential Revision: https://phabricator.services.mozilla.com/D109010
2021-03-19 12:36:57 +00:00
Simon Giesecke e0393699f5 Bug 1698098 - Add nsBaseHashtable::Clone methods. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106883
2021-03-19 09:01:46 +00:00
Nika Layzell c733984c4b Bug 1675820 - Part 6: Make DocGroup cycle-collected, r=farre,smaug
Previously, the DocGroup type was not cycle-collected, as it needed to have
references from other threads for Quantum DOM. Nowadays the only off-main-thread
use of DocGroup is for dispatching runnables to the main thread which should be
tracked using a performance counter for about:performance. This means we can
remove the DocGroup references from these dispatching callsites, only storing
the Performance Counter we're interested in, and simplify make DocGroup be
cycle-collected itself.

This fixes a leak caused by adding the WindowGlobalChild getter to
WindowContext, by allowing cycles between the document and its BrowsingContext
to be broken by the cycle-collector.

Differential Revision: https://phabricator.services.mozilla.com/D108865
2021-03-18 19:24:50 +00:00
Narcis Beleuzu ffb77b2d9a Backed out 9 changesets (bug 1581859) for bustages jsapi.h . CLOSED TREE
Backed out changeset 2a3a77ae1eae (bug 1581859)
Backed out changeset 181c3f29f222 (bug 1581859)
Backed out changeset f7c39feb502e (bug 1581859)
Backed out changeset 9c7d0015c616 (bug 1581859)
Backed out changeset d2b8ee78745d (bug 1581859)
Backed out changeset 92359266d420 (bug 1581859)
Backed out changeset 98ba6b96c900 (bug 1581859)
Backed out changeset 0eb043b5c904 (bug 1581859)
Backed out changeset 55a4c2fc561d (bug 1581859)
2021-03-18 08:26:57 +02:00
Kris Maglione d865a9f20f Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.

Differential Revision: https://phabricator.services.mozilla.com/D103210
2021-03-18 05:51:06 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Jens Stutte 48b1ebeb71 Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current shutdown state logic from nsThreadManager to AppShutdown; r=kmag,xpcom-reviewers
The SpinEventLoopUntilOrShutdown is interrupted in the main process only at stage "xpcom-shutdown", which is too late. In a content process instead we interrupt it early enough, at "content-child-will-shutdown".

This patch removes the current observer logic in nsThreadManager in favor of a current shutdown phase state machinery in AppShutdown and renames SpinEventLoopUntilOrShutdown to SpinEventLoopUntilOrQuit. It also ensures that SpinEventLoopUntilOrQuit breaks early (at "quit-application" in the main process).

For a further possible cleanup around shutdown state in child and parent process please refer to bug 1697745.

We have no automated test for this edge case, but we have diagnostic telemetry that will tell us if it helps.

Differential Revision: https://phabricator.services.mozilla.com/D107619
2021-03-17 08:07:48 +00:00
Jeff Muizelaar 702bd6eeec Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so you'd
expect we'd be able to go back to the straightforward implemention that works even
if stderr has been redirected. Unfortunately, Windows takes not buffering
stderr very seriously and fprintf will write out the results character
by character. This can cause log output lines to be intermixed which
breaks log parsing in CI. We keep using fdopen to create a new FILE*
that's buffered but instead of hard coding fd 2, we get the actual fd
that corresponds to stderr using fileno.

The mozglue implementation was cargo culted from xpcom, so we update it
as well.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2021-03-16 20:45:21 +00:00
Bas Schouten 2e3c2b0fe4 Bug 1698191: Convert IdleTaskRunner to use the TaskController API directly. r=smaug,sfink
Differential Revision: https://phabricator.services.mozilla.com/D108272
2021-03-16 14:39:45 +00:00
Mike Hommey 85aac3e34e Bug 1698697 - Fix BlockingResourceBase code with callstack tracking enabled. r=nika
Since GetAcquisitionState is never used independently of
ClearAcquisitionState, we change it to TakeAcquisitionState, such that
we don't require an expensive array copy in this case.

Differential Revision: https://phabricator.services.mozilla.com/D108554
2021-03-16 05:18:10 +00:00
Simon Giesecke 821c1a5be3 Bug 1692403 - Never inline DeferredFinalize(nsISupports*). r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108172
2021-03-15 16:44:23 +00:00
Valentin Gosu 2908546667 Bug 1698388 - Fix static-analysis warnings in NetLinkService.cpp r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D108358
2021-03-15 10:28:32 +00:00
Emilio Cobos Álvarez 9cec29125b Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 07:53:13 +00:00
Butkovits Atila f564d3679e Backed out changeset 2bc9ef937528 (bug 1698043) for causing failures on search-with-value.html. CLOSED TREE 2021-03-14 06:42:25 +02:00
Emilio Cobos Álvarez ceed5b80ff Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 02:35:49 +00:00
Nick Alexander 2dd2d5d19d Bug 1694530 - Allow to prepend a distinct header by using MOZ_LOG=prependheader. r=xpcom-reviewers,nika
This is follow-up to Bug 1687549, which added the `maxsize` flag.
That works well, but it's hard to distinguish separate logging
sessions.  This makes it a little easier.

This calls through to a slightly modified `Print`, leveraging the
concurrency correctness of that implementation.  Doing so doesn't
allow great visual distinction, but it's enough.

This produces output like:
```
$ firefox --backgroundtask success --MOZ_LOG prependheader

***

[(null) 1937604: Main Thread]: I/Logger Opening log
*** You are running in background task mode. ***
...
```
and
```
$ firefox --backgroundtask success --MOZ_LOG prependheader,raw

***

Opening log
*** You are running in background task mode. ***
...
```

Differential Revision: https://phabricator.services.mozilla.com/D106224
2021-03-13 00:18:47 +00:00
Andrew Osmond 1c682d57a9 Bug 1697195 - Force enable Software WebRender if Fission and experiment are enabled. r=jrmuizel
Fission without WebRender is an unsupported configuration and enrolls
users based on their compositor. However because of our own rollout of
WebRender, a user might start in early beta with WebRender and lose it
in late beta, while they remain enrolled in the Fission experiment.
Also, a user could lose WebRender because of crashes or device reset,
and we may fall back to Basic.

This patch forces Software WebRender as available (but does not override
Hardware WebRender) if Fission is enabled for users enrolled in the
Fission experiment. It also prevents fallback to Basic layers when
disabling acceleration due to crashes and runtime errors, so the user
will be stuck with Software WebRender at a minimum. It also enables
Software WebRender for Windows popups with transparency.

Differential Revision: https://phabricator.services.mozilla.com/D107661
2021-03-12 15:52:40 +00:00
Peter Van der Beken 9a22a56797 Bug 1697900 - Remove unused nsIClassInfo flags. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108096
2021-03-12 10:57:15 +00:00
Peter Van der Beken c1a5f99ad3 Bug 1697900 - Remove unused NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108095
2021-03-12 10:57:15 +00:00
Steve Fink 6e36aed705 Bug 1692308 - Add an initial delay to IdleTaskRunner r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D107504
2021-03-12 06:55:46 +00:00
Markus Stange a25fa13fd4 Bug 1697964 - Remove GetQuarantinePropKey(). r=mac-reviewers,tnikkel
GetQuarantinePropKey() used to contain a version check for pre-10.10, which
was removed in bug 1673051.

Depends on D108134

Differential Revision: https://phabricator.services.mozilla.com/D108135
2021-03-12 01:46:24 +00:00
Mike Hommey a17a4d839f Bug 1693462 - Avoid quarantine attribute being set when using nsILocalFile.copyTo* on macOS. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107949
2021-03-11 21:42:04 +00:00
Markus Stange 87d7d79487 Bug 1697343 - Remove code that was needed to support building with pre-10.12 SDKs. r=mac-reviewers,bradwerth
I skipped anything in third-party libraries. There's also one instance in plugin code but it'll be removed as part of the plugin removal effort.

Differential Revision: https://phabricator.services.mozilla.com/D107760
2021-03-11 02:46:23 +00:00
Anny Gakhokidze aa3895af8c Bug 1597427 - Check for recursive subframe loads in the parent process, r=kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D107311
2021-03-11 00:39:37 +00:00
Mike Hommey 9c0fcac97c Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses, and the updater, for which we keep using vsnprintf.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-03-10 23:52:40 +00:00
Agi Sferro eac41f1807 Bug 1694481 - Remove unused methods in GeckoAppShell. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106183
2021-03-10 22:43:08 +00:00
Emilio Cobos Álvarez 2a1828662f Bug 1696507 - Remove support for NO_UNLINK version of cycle collector macros. r=smaug
And fix existing users of course.

The frame loader one is the only one slightly scary (but if it causes
trouble we could make nsObjectLoadingContent::Unlink a no-op).

Differential Revision: https://phabricator.services.mozilla.com/D107269
2021-03-10 19:50:40 +00:00
nchevobbe 269bba81cd Bug 1696856 - [devtools] Move isForwardedFromContentProcess to nsConsoleMessage. r=baku.
Differential Revision: https://phabricator.services.mozilla.com/D107410
2021-03-10 12:44:22 +00:00
Simon Giesecke 2740499927 Bug 1634281 - Remove nsDataHashtable. r=xpcom-reviewers,nika
After the previous patch, nsDataHashtable is now unused, and can be removed in
favor of nsTHashMap.

Differential Revision: https://phabricator.services.mozilla.com/D106120
2021-03-10 10:47:48 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Masayuki Nakano 7af10cee55 Bug 1677566 - part 3: Ignore non-deletable ranges in `HTMLEditor::HandleDeleteSelection()` r=m_kato
For making delete handlers simpler, and set better target ranges to the
corresponding `beforeinput` event, we should ignore non-editable ranges
before handling deletion.

This patch makes editor stop handling deleteion when a range crosses editing
host boundaries.  In this case, Gecko has done nothing, but fired
`beforeinput` event.  Note that Blink deletes editable contents in the range
**until** it meets first non-editable content, but I don't think this is
a good behavior because it makes things complicated.  Therefore, I filed
a spec issue: https://github.com/w3c/editing/issues/283

On the other hand, this behavior change causes different behavior in
https://searchfox.org/mozilla-central/source/editor/libeditor/crashtests/1345015.html

It tries to insert paragraph into `<html>` element, but our editor currently
does not support it.  Therefore, it hits `MOZ_ASSERT`.  Therefore, this patch
added a new check into `HTMLEditor::InsertParagraphSeparatorAsSubAction()`.

Differential Revision: https://phabricator.services.mozilla.com/D107588
2021-03-09 23:57:54 +00:00
David Parks f302214e11 Bug 1695954: Move Gecko Logging MDN Page In-tree r=nika
Moves the contents of https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging in tree, with minor edits.  The only substantive addition is the information in the warning that explains how to get child process logging from sandboxed processes on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D107579
2021-03-09 16:27:29 +00:00
Simon Giesecke 32b1a38aa7 Bug 1634281 - Add nsTHashMap. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105962
2021-03-09 11:39:35 +00:00
Simon Giesecke cb6c8aead4 Bug 1695162 - Make nsTHashtable::ConstIter return a real ConstIterator. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D107038
2021-03-09 10:28:16 +00:00
Kris Wright af0d30739c Bug 1571186 - Disable ExpirationTracker gtest on all OSX r=xpcom-reviewers,mccr8
We already had this disabled on debug but it still produces intermittents with no clear reason on opt. We still test this on other platforms so I want to go ahead and disable this outright until we can fix this properly. Followup filed in bug 1696959.

Differential Revision: https://phabricator.services.mozilla.com/D107500
2021-03-08 21:54:59 +00:00
Steve Fink de5993049e Bug 1696456 - Rename budget to minimumUsefulBudget in IdleTaskRunner r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D107239
2021-03-08 16:27:43 +00:00
Jan de Mooij 2acffb58a7 Bug 1689413 part 17 - Remove ObjectGroup. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D106987
2021-03-06 01:05:26 +00:00
Narcis Beleuzu c21715e694 Backed out 18 changesets (bug 1689413) for wpt failures on Event-subclasses-constructors.html CLOSED TREE
Backed out changeset 2fe249306030 (bug 1689413)
Backed out changeset 4d4d052bf8d3 (bug 1689413)
Backed out changeset a11a96dce11b (bug 1689413)
Backed out changeset d1411da6c254 (bug 1689413)
Backed out changeset 8262ed245e27 (bug 1689413)
Backed out changeset ed3ef7b5c8c8 (bug 1689413)
Backed out changeset 63eb8f93c6d8 (bug 1689413)
Backed out changeset 558e0b0af7b7 (bug 1689413)
Backed out changeset 5595064ffb60 (bug 1689413)
Backed out changeset e15f1a6f5a38 (bug 1689413)
Backed out changeset 95fa0ec36f7a (bug 1689413)
Backed out changeset 80d594d926ad (bug 1689413)
Backed out changeset 22854b710fbf (bug 1689413)
Backed out changeset 4531d5c25694 (bug 1689413)
Backed out changeset f1bb16079c0e (bug 1689413)
Backed out changeset 211c4f80a286 (bug 1689413)
Backed out changeset 6f7514b0a657 (bug 1689413)
Backed out changeset 76db3b04dedd (bug 1689413)
2021-03-06 01:11:29 +02:00
Jan de Mooij 8f52a7a890 Bug 1689413 part 17 - Remove ObjectGroup. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D106987
2021-03-05 19:10:12 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Florian Quèze dd2987078f Bug 1696406 - Nested event loops should be visible in the Firefox Profiler, r=nika.
Differential Revision: https://phabricator.services.mozilla.com/D107202
2021-03-04 21:24:10 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke 502b8a0314 Bug 1695162 - Add weak accessor to nsBaseHashtableET to better support range iteration. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106640
2021-03-04 18:52:19 +00:00
Simon Giesecke c57f081813 Bug 1634281 - Merge nsRefPtrHashtable and nsInterfaceHashtable into nsRefCountedHashtable. r=xpcom-reviewers,necko-reviewers,nika
The only difference between nsRefPtrHashtable and nsInterfaceHashtable was
that the former enforced explicit refcounting also with InsertOrUpdate.
This enforcement is removed.

Differential Revision: https://phabricator.services.mozilla.com/D106006
2021-03-04 18:52:19 +00:00
Simon Giesecke 3004f1f2f3 Bug 1634281 - Make nsDataHashtable a type alias. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105961
2021-03-04 18:52:18 +00:00
Simon Giesecke 6da5224516 Bug 1634281 - Add nsHashtablesFwd.h and remove all other forward declarations for hashtables. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105960
2021-03-04 18:52:17 +00:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Simon Giesecke c5bdcb69d1 Bug 1695162 - Make nsBaseHashtable::ConstIter return a real ConstIterator. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106642
2021-03-03 08:58:53 +00:00
Simon Giesecke d9f1e7e67d Bug 1695162 - Delete nsBaseHashtable::Iterator move constructor as it's almost unused. r=xpcom-reviewers,nika
The only place using it is HashElemIter, which unnecessarily wraps Iterator in a
Maybe. This wrapping is removed.

Differential Revision: https://phabricator.services.mozilla.com/D106639
2021-03-03 08:58:53 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Florian Quèze b41e171c11 Bug 1694462 - Remove the nsIThreadManager.newThread API (newNamedThread should be used instead), r=bas,KrisWright.
Differential Revision: https://phabricator.services.mozilla.com/D106267
2021-03-02 22:34:51 +00:00
Jens Stutte 05581ddca4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 22:11:58 +00:00
Cosmin Sabou b2eb620ed0 Backed out changeset 03cae7800b41 (bug 1678330) for mochitest plain failures on test_window_open_discarded_bc.html. CLOSED TREE 2021-03-02 20:18:21 +02:00
Jens Stutte a0af9ea0a4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 15:15:20 +00:00
Olli Pettay 9a5e1b83eb Bug 1689601, hide fission.bfcacheInParent pref access behind a function which checks that also SHIP is enabled, r=peterv,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106562
2021-03-02 12:13:21 +00:00
Mihai Alexandru Michis 87f481bf9a Backed out 16 changesets (bug 1689601) for causing cpp bustages in nsFrameLoader.
CLOSED TREE

Backed out changeset 6e5523a7210d (bug 1689601)
Backed out changeset 745eaa468c74 (bug 1689601)
Backed out changeset a594bd02b8b6 (bug 1689601)
Backed out changeset 0c5fe977ced6 (bug 1689601)
Backed out changeset 2fca23521891 (bug 1689601)
Backed out changeset 334aeb627855 (bug 1689601)
Backed out changeset 2b2081a15d67 (bug 1689601)
Backed out changeset 307bde43cc96 (bug 1689601)
Backed out changeset 04aadec67ce2 (bug 1689601)
Backed out changeset 701eccb34772 (bug 1689601)
Backed out changeset 278db692aa8b (bug 1689601)
Backed out changeset c261c243a64d (bug 1689601)
Backed out changeset 7e8022e5696a (bug 1689601)
Backed out changeset 6138bfc6c08d (bug 1689601)
Backed out changeset 63295b3a62d0 (bug 1689601)
Backed out changeset 6d02e59ddc51 (bug 1689601)
2021-03-02 13:15:10 +02:00
Olli Pettay f09a7f25d5 Bug 1689601, hide fission.bfcacheInParent pref access behind a function which checks that also SHIP is enabled, r=peterv,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106562
2021-03-02 09:44:14 +00:00
Simon Giesecke 25331cfdfd Bug 1634281 - Pull up GetOrInsertNew to nsBaseHashtable and support other smart pointer types. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106486
2021-03-02 09:02:19 +00:00
Simon Giesecke f4f7c593e0 Bug 1692835 - Remove nsJSThingHashtable. r=xpcom-reviewers,nika
The only use of nsJSThingHashtable is replaced by a direct use of
nsBaseHashtable.

Differential Revision: https://phabricator.services.mozilla.com/D105971
2021-03-02 09:02:19 +00:00
Simon Giesecke 5441c4cbcf Bug 1693530 - Add nsBaseHashtable::TryLookupOrInsertWith variant that accepts a functor returning a mozilla::Result. r=janv,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105634
2021-03-02 09:02:19 +00:00
Simon Giesecke 4c057f184c Bug 1692123 - Refactor and improve documentation of nsTArray_RelocateUsingMoveConstructor. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105454
2021-03-02 08:28:25 +00:00
Simon Giesecke a31d898d28 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in xpcom. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106094
2021-03-01 09:59:33 +00:00
Simon Giesecke 41be2e9861 Bug 1691913 - Update documentation of nsBaseHashtable. r=xpcom-reviewers,nika
In particular, clarify where UserDataType is used and where not.

Differential Revision: https://phabricator.services.mozilla.com/D105478
2021-03-01 09:59:31 +00:00
Simon Giesecke 1657421237 Bug 1691913 - Remove custom nsDataHashtable::GetValue. r=xpcom-reviewers,nika
Since all uses of GetValue have been replaced by other methods, the method
itself can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D105477
2021-03-01 09:59:31 +00:00
Simon Giesecke b399a8194c Bug 1691913 - Add some convenience methods to LookupResult and EntryHandle. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105475
2021-03-01 09:59:29 +00:00
Simon Giesecke cf78ee5d9e Bug 1695275 - Simplify hashtable clearing when EntryType is trivially destructible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106647
2021-03-01 08:17:48 +00:00
Simon Giesecke 9e76c043ff Bug 1695275 - Simplify hashtable clearing when there is no Clear operation. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106644
2021-03-01 08:17:47 +00:00
Jens Stutte 1e19379853 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-27 14:38:14 +00:00
Butkovits Atila bb3fe218a4 Backed out changeset be43a81b35f9 (bug 1689953) for causing failure at test_terminator_record.js. CLOSED TREE 2021-02-27 05:03:11 +02:00
Jens Stutte f6d52040b9 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-26 21:33:29 +00:00
Simon Giesecke 0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke be7dc83fa6 Bug 1691913 - Mark nsBaseHashtable (and its subclasses') member functions nodiscard where appropriate. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105474
2021-02-26 09:22:53 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Adam Gashlin 37c29fd026 Bug 1685213 - Part 1: Save and access the startup shortcut. r=bytesized
A. The shell provides the startup shortcut in STARTUPINFOW when it
starts a process. If the launcher process runs, we must pass this along
to the real process being created.

B. lpTitle can be overwritten, in particular when the AUMID is set for
WinTaskbar, so save it in XREMain::XRE_mainStartup() in order to access
it later.

C. Add an accessor for the saved shortcut.

Differential Revision: https://phabricator.services.mozilla.com/D106343
2021-02-25 23:15:46 +00:00
Jared Wein 5810ee434c Bug 1665390 - Style bookmarks toolbar and tabs toolbar tooltips. r=NeilDeakin,ntim
Differential Revision: https://phabricator.services.mozilla.com/D104257
2021-02-25 20:47:54 +00:00
Aaron Klotz 004362bf3e Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium
We know that some GV installations (particularly but not exlcusively Focus) are
failing to load `libxul.so` during early Gecko bootstrapping. Unfortunately
a boolean pass/fail result is not giving us sufficient information to be able to
properly troubleshoot this problem.

This patch adds `mozilla::Result`-based return values to `XPCOMGlueLoad` and
`GetBootstrap` in an effort to produce more actionable information about these
failures.

We include either a `nsresult` or, if the failure is rooted in a dynamic linker
failure, appropriate platform-specific error information:

* On Unix-based platforms, a `UniqueFreePtr<char>` containing the string from `dlerror(3)`;
* On Windows, the Win32 `DWORD` error code from `GetLastError()`.

For non-Android platforms, I updated them to handle the new return type, but
otherwise did not make any further changes.

For Android, we include the error information in the message string that we pass
into the Java `Exception` that is subsequently thrown.

Differential Revision: https://phabricator.services.mozilla.com/D104263
2021-02-23 23:25:22 +00:00
Noemi Erli f3d04404af Merge mozilla-central to autoland. a=merge CLOSED TREE 2021-02-22 15:27:29 +02:00
Mozilla Releng Treescript fa720adf0e Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2021-02-22 12:50:45 +00:00
Simon Giesecke 7c931c97c4 Bug 1689218 - Rename nsBaseHashtable::GetAndRemove to Extract. r=necko-reviewers,dragana
First, it should be called "Lookup" rather than "Get" because it returns
DataType (rather than UserDataType), but that would still be confusing,
since as opposed to other Lookup* methods, it does not return a DataType&
(and obviously, it can't). So "Extract" seems to be a better name, cf.
mozilla::Maybe::extract.

Differential Revision: https://phabricator.services.mozilla.com/D105471
2021-02-22 12:07:48 +00:00
Simon Giesecke c5f7800f35 Bug 1691913 - Rename nsClassHashtable::LookupOrAdd to GetOrInsertNew. r=xpcom-reviewers,nika
It should be called "Get" rather than "Lookup" because it returns
UserDataType. "Add" is called "Insert" in the other methods.

Differential Revision: https://phabricator.services.mozilla.com/D105470
2021-02-22 12:07:47 +00:00
Simon Giesecke 901cbda9f5 Bug 1691913 - Fix forwarding of constructor arguments to nsBaseHashtableET. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105469
2021-02-22 12:07:47 +00:00
Markus Stange 055d05d001 Bug 1694000 - Ignore "Missing Touches." exception when it bubbles up to the event loop. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D105871
2021-02-20 22:11:34 +00:00
Marco Castelluccio 337ea53819 Bug 1693814 - Reenable some arena allocator tests on ccov builds since they no longer fail. r=jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D105785
2021-02-19 17:03:07 +00:00
Alexis Beingessner 92afde7986 Bug 1686616 - register all Services.py services with components.conf. r=kmag,necko-reviewers,valentin
These services had their name added to components.conf:

* GfxInfo
* ThirdPartyUtil
* History
* HttpActivityDistributor
* UUIDGenerator
* ServiceWorkerManager
* PermissionManager

These services were added to componenets.conf under a different name:

* DirectoryService => Directory
* IOService => IO
* StringBundleService => StringBundle
* CacheStorageService => CacheStorage
* StreamTransportService => StreamTransport
* SocketTransportService => SocketTransport

These services weren't migrated to components.conf because only Rust
code uses them:

* RemoteAgent
* XULRuntime
* PrefService

These services weren't migrated to components.conf because they're unused:

* ToolkitChromeRegistry (used as ChromeRegistry)
* XULChromeRegistry (used as ChromeRegistry)
* Bits (completely unused)

These services were already available in components.conf but are still
used by rust code:

* URIFixup

These services weren't migrated because they will be handled in
subsequent patchsets:

* ObserverService

For the record, the following Services are being used by Rust code
and must remain until a Rust version of Components.h is written:

* RemoteAgent
* XULRuntime
* PrefService
* URIFixup
* ObserverService
* DirectoryService
* ThirdPartyUtil

Also the cocoa GfxInfo service was changed to use components.conf instead
of registering it at runtime, as all the other widgets were already doing
it this way.

Differential Revision: https://phabricator.services.mozilla.com/D105521
2021-02-18 13:26:28 +00:00
Bas Schouten bbb0d338be Bug 1691517: Do not crash inside TaskController when the main thread is unavailable. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105402
2021-02-18 03:53:29 +00:00
Gerald Squelart 96f3fabfcb Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian
No code changes.

Build issues were found by renaming `MOZ_GECKO_PROFILER` to something else in toolkit/moz.configure, in both unified and non-unified builds, on all supported platforms.

Also updated some profiler-related comments.

Differential Revision: https://phabricator.services.mozilla.com/D105375
2021-02-17 22:36:28 +00:00
Andreea Pavel 64289058b6 Backed out 5 changesets (bug 1690167) for failing xpcshell at bootstrapSvc.js on a CLOSED TREE
Backed out changeset d28c0f11743f (bug 1690167)
Backed out changeset 3b2bebed9128 (bug 1690167)
Backed out changeset 7e925e90a251 (bug 1690167)
Backed out changeset f85934a2b7ad (bug 1690167)
Backed out changeset 6d83474e81bb (bug 1690167)
2021-02-17 07:10:58 +02:00
Markus Stange 8f2e19e4c5 Bug 1692401 - Add a NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK macro which actually aborts. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D104962
2021-02-16 22:55:22 +00:00
Markus Stange 355baf5b39 Bug 1692391 - Rename NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK macros, replacing ABORT with IGNORE. These macros just log the exception and move on, without aborting. r=haik
This patch was generated automatically, using the following commands:

```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK/NS_OBJC_BEGIN_TRY_IGNORE_BLOCK/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK/NS_OBJC_END_TRY_IGNORE_BLOCK/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104960
2021-02-16 22:55:21 +00:00
Markus Stange 9bc888af4a Bug 1692391 - Replace NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_NIL with the functionally identical NS_OBJC_BEGIN/END_TRY_BLOCK_RETURN(nil). r=haik
This patch was generated automatically, using the following commands:

```
rg -l 'NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL' . | xargs sed -i '' -e 's/NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL/NS_OBJC_BEGIN_TRY_BLOCK_RETURN/g'
rg -l 'NS_OBJC_END_TRY_ABORT_BLOCK_NIL' . | xargs sed -i '' -e 's/NS_OBJC_END_TRY_ABORT_BLOCK_NIL/NS_OBJC_END_TRY_BLOCK_RETURN(nil)/g'
```

Differential Revision: https://phabricator.services.mozilla.com/D104959
2021-02-16 22:55:21 +00:00