Commit Graph

20176 Commits

Author SHA1 Message Date
Doug Thayer
206bfb45d1 Bug 1648142 - Block on cert storage ops prior to shutdown r=keeler
This just spins the event loop during fast shutdown until all queued
cert_storage tasks have completed. The patch achieves this by simply
adding a counter which will be incremented and decremented on the
main thread via tying into the tasks' `new` and `done` methods. A
slightly more performant solution would use a condvar and sleep the
main thread waiting on pending operations to complete, but given the
low frequency of these occuring during shutdown, such an approach
would be overkill.

Differential Revision: https://phabricator.services.mozilla.com/D80906
2020-06-25 20:33:51 +00:00
Emilio Cobos Álvarez
5dc443249c Bug 1648334 - Use less unsafe in gecko_logger. r=froydnj,valentin
We were storing LogModule::mName as an &'static str in the map... That's
not fine.

The Arc shenanigans were also more complicated than they need to be IMO.

This uses a plain atomic bool to keep the fast path snappy.

Differential Revision: https://phabricator.services.mozilla.com/D81007
2020-06-25 15:23:16 +00:00
Honza Bambas
2b6b893f89 Bug 1638925 - Ensure that the event gets destroyed within the guards r=jya
Differential Revision: https://phabricator.services.mozilla.com/D80171
2020-06-24 13:51:25 +00:00
Honza Bambas
2946f7e5b9 Bug 1638925 - Do not keep a raw pointer to an event in LogTaskBase::Run RAII class to avoid possible work with a released pointer, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D80640
2020-06-24 13:51:23 +00:00
Honza Bambas
5c088661ed Bug 1638925 - Log IPC messages, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79621
2020-06-25 12:27:51 +00:00
Honza Bambas
a81bb249b1 Bug 1638925 - Log names of nsINamed runnables, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79620
2020-06-24 13:49:44 +00:00
Honza Bambas
8ef571ccca Bug 1638925 - Log promise microtasks dispatch-and-run, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79618
2020-06-24 13:49:09 +00:00
Simon Giesecke
7b417b5ef3 Bug 1648391 - Use rhs-first optimization from IsDependentOn in IsDependentOnWithLength. r=froydnj
Depends on D81054

Differential Revision: https://phabricator.services.mozilla.com/D81055
2020-06-25 11:53:48 +00:00
Simon Giesecke
bebf92b951 Bug 1648391 - Use logical or rather than binary or to allow for short-circuit evaluation. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81054
2020-06-25 11:49:50 +00:00
Brindusan Cristian
d41e442d47 Backed out 2 changesets (bug 1606706) for wpt leaks. CLOSED TREE
Backed out changeset 42b8f6456d16 (bug 1606706)
Backed out changeset 3fe0b4051541 (bug 1606706)
2020-06-25 14:53:30 +03:00
Bas Schouten
f9399d1df7 Bug 1606706 - Part 3: Enable new TaskController code by default. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74673
2020-06-25 08:04:01 +00:00
Chris Fronk
6f84249b41 Bug 1337953 - Make nsDeque templated on pointer type r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79629
2020-06-25 02:39:23 +00:00
Butkovits Atila
7916df7f02 Backed out changeset 5614bcd268d1 (bug 1337953) for bustage at FuzzyLayer.cpp. CLOSED TREE 2020-06-23 11:01:37 +03:00
Makoto Kato
f8d53560e0 Bug 1490661 - Part 1. Support HTML.enterKeyHint in Nighly. r=webidl,smaug,hsivonen
On mobile platform, "ENTER" key on software keyboard key can sometimes
change to "Next" and etc. Although Firefox OS/Firefox Android have
`mozactionhint` attribute for its behaviour, This is standardized version
of it.

Chrome and Safari already support it now, so I would like to support this
on Firefox/GeckoView Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D79641
2020-06-23 06:37:20 +00:00
Jean-Yves Avenard
05a0f10af0 Bug 1637500 - P3. Have GetCurrentSerialEventTarget return running XPCOMThreadWrapper. r=froydnj
This will allow to remove AbstractThread::Current() as GetCurrentSerialEventTarget TLS value will be set whenever a task dispatched on the XPCOMThreadWrapper is run.

Differential Revision: https://phabricator.services.mozilla.com/D80355
2020-06-23 05:05:38 +00:00
Jean-Yves Avenard
87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Jean-Yves Avenard
28c38fcc2b Bug 1637500 - P1. Have GetCurrentThreadSerialEventTarget returns the currently running TaskQueue if any. r=froydnj
In the future, we may want to extend GetCurrentThreadSerialEventTarget to return the actual nsISerialEventTarget used to dispatch the task.

Differential Revision: https://phabricator.services.mozilla.com/D80353
2020-06-23 05:02:39 +00:00
Chris Fronk
cea9cef934 Bug 1337953 - Make nsDeque templated on pointer type r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79629
2020-06-23 00:58:13 +00:00
Jean-Yves Avenard
fadd7f165d Bug 1632099 - P1. Have nsQueryObject accept const smart pointers. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80385
2020-06-22 14:42:16 +00:00
Toshihito Kikuchi
e8562a8631 Bug 1646867 - SystemHeapSize counts only the process default heap on Windows. r=froydnj,dmajor
The crash reports indicate a situation where a non-default heap is destroyed
after we retrieve a handle is happening on a regular basis.
We've decided to count only the default heap, ignoring all non-default heaps
which we don't manage.

Differential Revision: https://phabricator.services.mozilla.com/D80299
2020-06-22 20:42:16 +00:00
Simon Giesecke
a3b46517cb Bug 1646772 - Add nsClassHashtable::LookupOrAddFromFactory and missing tests for nsClassHashtable::LookupForAdd. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80211
2020-06-22 14:54:18 +00:00
Jean-Yves Avenard
4e20dd6e65 Bug 1646054 - P2. Always retain dispatch flags r=froydnj
When TaskQueue was first conceived; it was only used with AbstractThreads and with tail dispatch.
By default, AbstractThread::Dispatch dropped the flags , as it was dispatching all tasks via the tail dispatcher.

It was an oversight, there's no use-case where we wouldn't want the dispatch flags to be carried forward.

It also simplifies the code and TaskQueue's use.

Depends on D80351

Differential Revision: https://phabricator.services.mozilla.com/D80352
2020-06-22 13:55:23 +00:00
Jean-Yves Avenard
ea34205395 Bug 1646054 - P1. Remove EventTargetWrapper class. r=froydnj
We also establish the intent of bug 1602167 on the TaskQueue object

Differential Revision: https://phabricator.services.mozilla.com/D80351
2020-06-22 13:55:21 +00:00
Simon Giesecke
8d168248fa Bug 1645386 - Use nsTObserverArray::NonObservingRange where possible instead of ForwardRange. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79507
2020-06-22 08:21:24 +00:00
Simon Giesecke
3a2ac50dc4 Bug 1645360 - Rename RemoveElementsBy to NonObservingRemoveElementsBy. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79488
2020-06-22 08:20:57 +00:00
David Major
2a6bf134e0 Bug 1646407 - Fix a snprintf complaint in nsTimerImpl.cpp r=njn
We have a clang-plugin check that wants to prefer `SprintfLiteral` over `snprintf`, but for some reason this wasn't caught before clang-11. I _think_ it has to do with previous versions not being able to see that `buflen` was constant, but I'm not really sure.

Differential Revision: https://phabricator.services.mozilla.com/D80021
2020-06-21 13:12:30 +00:00
Geoff Brown
dbfd31bcb6 Bug 1644876 - Add --enable-fission option to 'mach run'; r=kashav
Differential Revision: https://phabricator.services.mozilla.com/D80298
2020-06-19 16:20:00 +00:00
Gijs Kruitbosch
dbbc92362d Bug 1644877 - mark .der files as executable (just like .crt), r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D80172
2020-06-18 13:09:50 +00:00
Simon Giesecke
9a81912985 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Replace. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78695
2020-06-18 08:03:02 +00:00
Simon Giesecke
c2985d448f Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Assign. r=froydnj
This also extracts new private member functions AssignOwned and AssignNonDependent.

Furthermore, it fixes an inconsistency for the dependent case: Formerly,
this caused the substring tuple to be materialized into a linear string
infallibly, although the function was a fallible one. It only assigned the
resulting string fallibly, but this would never have failed, since the
allocation already happened before.

Differential Revision: https://phabricator.services.mozilla.com/D78694
2020-06-18 08:03:09 +00:00
Simon Giesecke
1a9edbd8d5 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Append. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78693
2020-06-18 08:02:52 +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
Cosmin Sabou
3b4176468a Backed out 3 changesets (bug 1644163) for mochitest asan failures. CLOSED TREE
Backed out changeset 954c49edcc76 (bug 1644163)
Backed out changeset 8d78185301f1 (bug 1644163)
Backed out changeset 338bd5525594 (bug 1644163)
2020-06-18 13:20:43 +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
Simon Giesecke
c852bfeee1 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Replace. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78695
2020-06-18 08:03:02 +00:00
Simon Giesecke
b556d0f13b Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Assign. r=froydnj
This also extracts new private member functions AssignOwned and AssignNonDependent.

Furthermore, it fixes an inconsistency for the dependent case: Formerly,
this caused the substring tuple to be materialized into a linear string
infallibly, although the function was a fallible one. It only assigned the
resulting string fallibly, but this would never have failed, since the
allocation already happened before.

Differential Revision: https://phabricator.services.mozilla.com/D78694
2020-06-18 08:03:09 +00:00
Simon Giesecke
cdcb021cc4 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Append. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78693
2020-06-18 08:02:52 +00:00
Eric Rahm
ba9b93f039 Bug 1646543 - Replace blacklist with more appropriate names. r=xpcom-reviewers,nika
This removes variants of "blacklist" from the xpcom directory. The preference name "network.file.path_blacklist" is left in place and will need a more thorough plan for removal. Instances of `MOZ_ASAN_BLACKLIST` remain as well and should be replaced in a larger modifcation of the `#define` in the mfbt component.

Differential Revision: https://phabricator.services.mozilla.com/D80098
2020-06-17 23:55:46 +00:00
Brindusan Cristian
35fe5d64b2 Backed out 4 changesets (bug 1638925) for build bustages at ipc_channel_posix.cc. CLOSED TREE
Backed out changeset e0fe5351fdf7 (bug 1638925)
Backed out changeset 2c8b67413cd6 (bug 1638925)
Backed out changeset 4ea2c9ceb540 (bug 1638925)
Backed out changeset 84236f1b9064 (bug 1638925)
2020-06-17 20:28:41 +03:00
Honza Bambas
f2278bf3e2 Bug 1638925 - Log IPC messages, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79621
2020-06-17 16:15:06 +00:00
Honza Bambas
91ff5e401f Bug 1638925 - Log names of nsINamed runnables, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79620
2020-06-17 16:14:27 +00:00
Honza Bambas
828868b839 Bug 1638925 - Log promise microtasks dispatch-and-run, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79618
2020-06-17 16:13:51 +00:00
Simon Giesecke
9cf654a99f Bug 1645429 - Do not use ReverseIterator in nsTObserverArray::NonObservingRange. r=froydnj
Depends on D79957

Differential Revision: https://phabricator.services.mozilla.com/D79958
2020-06-17 13:29:02 +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
Simon Giesecke
8c0f977ccd Bug 1645429 - Use std::reverse_iterator instead of mozilla::ReverseIterator where possible. r=froydnj
mozilla::ReverseIterator is required for "stashing iterators", but otherwise
std::reverse_iterator can be used and is potentially more efficient.

Also fix some other glitches in iterator type definitions.

Differential Revision: https://phabricator.services.mozilla.com/D79489
2020-06-16 10:14:01 +00:00
Simon Giesecke
08dfb8127e Bug 1645447 - Add ForwardIterator::Remove and EndLimitedIterator::Remove functions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79512
2020-06-15 17:04:08 +00:00
Simon Giesecke
94ae89f1d9 Bug 1645359 - Add a nsTObserverArray::NonObservingRange. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79487
2020-06-15 08:43:54 +00:00
Simon Giesecke
0735ecafd8 Bug 1645382 - Remove unnecessary arguments from NS_OBSERVER_ARRAY_NOTIFY_* macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79485
2020-06-15 09:05:00 +00:00
Simon Giesecke
298981065e Bug 1645339 - Use range-based for with nsTObserverArray in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79484
2020-06-15 08:55:27 +00:00
Andrea Marchesini
6cd06a958e Bug 1636823 - nsInputTransport must support blocking and async source - part 1 - Use NS_MakeAsyncNonBlockingInputStream, r=smaug,necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D78233
2020-06-12 22:48:07 +00:00