Commit Graph

1987 Commits

Author SHA1 Message Date
Randell Jesup
4be7858359 Bug 1572337: Make GetRunningEventDelay handle threadpools r=froydnj
Threadpools run an event that then runs other events, so we need to tweak
things for GetRunningEventDelay()

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

--HG--
extra : moz-landing-system : lando
2019-11-08 21:07:45 +00:00
Randell Jesup
6cc1163786 Bug 1572337: Monitor running event delays and start times r=froydnj
This lets us determine the time that an event has been running, and the time
that the event spent queued - which can be used to figure out 'jank' at the
time the event was queued. For PrioritizedEventQueues, only if such queuing
would delay an input event then the queuing delay is reported.

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

--HG--
extra : moz-landing-system : lando
2019-11-08 21:07:36 +00:00
Nathan Froyd
bc5cca4b95 Bug 1594730 - fix silly bug for the background event target; r=KrisWright
The static analysis caught this for me in Bug 1593812, I was just to
dumb to actually apply this change prior to commit.

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

--HG--
extra : moz-landing-system : lando
2019-11-07 16:04:45 +00:00
Razvan Maries
cb87085ec4 Backed out 3 changesets (bug 1572337) ford perma fails. CLOSED TREE
Backed out changeset 00da7156d3fa (bug 1572337)
Backed out changeset 4eda65e054d8 (bug 1572337)
Backed out changeset ea6d5b4b038b (bug 1572337)
2019-11-07 17:29:46 +02:00
Randell Jesup
95192d13e3 Bug 1572337: Make GetRunningEventDelay handle threadpools r=froydnj
Threadpools run an event that then runs other events, so we need to tweak
things for GetRunningEventDelay()

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

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:32 +00:00
Randell Jesup
10353eba91 Bug 1572337: Monitor running event delays and start times r=froydnj
This lets us determine the time that an event has been running, and the time
that the event spent queued - which can be used to figure out 'jank' at the
time the event was queued. For PrioritizedEventQueues, only if such queuing
would delay an input event then the queuing delay is reported.

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

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:28 +00:00
Nathan Froyd
1b72ad9705 Bug 1593812 - add I/O awareness for the background thread target; r=KrisWright
We need some way of differentiating "tasks that just consume CPU"
vs. "tasks that block on some external resource" like reading from a
socket or a file.  If we didn't have this, we'd either a) have a thread
pool sized for the number of CPUs where having all the threads blocked
on I/O--and therefore no new tasks are able to run--or b) have a thread
pool that tries to increase the number of working threads based on the
number of submitted tasks and winds up having too many tasks running
with not enough CPUs to run them on.

This flag enables us to theoretically get the best of both worlds: we
can set aside `~#CPUs` threads for CPU-intensive work, and
`$SOME_NUMBER` threads for I/O work.  The latter number can be adjusted
up if the I/O load on the system is particularly heavy.

The implementation strategy of this patch is to use two separate thread
pools for the two different kinds of work.  It's entirely possible that
we'll want to use a single thread pool to coordinate thread create
between the two kinds of work, or even migrate threads from one kind of
work to the other, but such improvements can be future work.  The focus
right now is providing the rest of Gecko with a common funnel to put
tasks into, and we can adjust what's at the end of the funnel at a later
point.

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

--HG--
extra : moz-landing-system : lando
2019-11-05 18:33:25 +00:00
Nathan Froyd
892767cef9 Bug 1593802 - don't drop dispatch flags in TaskQueue's EventTargetWrapper; r=erahm
`TaskQueue` wraps an `nsIEventTarget` to provide "one runnable at a
time" execution policies regardless of the underlying implementation of
the wrapped `nsIEventTarget` (e.g. a thread pool).  `TaskQueue` also
provides a `nsISerialEventTarget` wrapper, `EventTargetWrapper`, around
itself (!) for consumers who want to continue to provide a more
XPCOM-ish API.

One would think that dispatching tasks to `EventTargetWrapper` with a
given set of flags would pass that set of flags through, unchanged, to
the underlying event target of the wrapped `TaskQueue`.

This pass-through is not the case.  `TaskQueue` supports a "tail
dispatch" mode of operation that is somewhat underdocumented.  Roughly,
tail dispatch to a `TaskQueue` says (with several other conditions) that
dispatched tasks are held separately and not passed through to the
underlying event target.  If a given `TaskQueue` supports tail dispatch
and the dispatcher also supports tail dispatch, any tasks dispatched to
said `TaskQueue` are silently converted to tail dispatched tasks.  Since
tail dispatched tasks can't meaningfully have flags associated with
them, the current implementation simply drops any passed flags on the floor.

These flags, however, might be meaningful, and we should attempt to
honor them in the cases we're not doing tail dispatch.  (And when we are
doing tail dispatch, we can verify that the requested flags are not
asking for peculiar things.)

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

--HG--
extra : moz-landing-system : lando
2019-11-05 16:59:30 +00:00
Nathan Froyd
f64f04d6ef Bug 1593803 - rename NS_DispatchToBackgroundThread to NS_DispatchBackgroundTask; r=KrisWright
The current API name is bad: we want it to be read "some background
thread", but it could just as easily be read "a singular background
thread", which would lead people to assume that for:

```
NS_DispatchToBackgroundThread(...);
NS_DispatchToBackgroundThread(...);
```

the dispatched tasks will necessarily run in the order they are
dispatched, which is not the case.

Let's try to head off that interpretation by renaming this function.

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

--HG--
extra : moz-landing-system : lando
2019-11-05 21:19:18 +00:00
Gerald Squelart
3b6a065df5 Bug 1592496 - nsProxyRelease.h clean-up - r=froydnj
Small changes:
- Ordered #includes.
- Fixed some comments (obsolete remarks, or typos).
- Set `nsMainThreadPtrHolder::mRawPtr` from constructor initializers.
- Modernized `nsMainThreadPtrHolder` copy-prevention.
- Default-initialize `nsMainThreadPtrHolder` members, for extra safety.
- Made `nsMainThreadPtrHandle::get()` `const` (consistent with others).
- Moved nsMainThreadPtrHandle private member to the end.
- Removed now-unused `mozilla::PtrHolder` and `mozilla::PtrHandle` aliases.

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

--HG--
extra : moz-landing-system : lando
2019-10-30 20:33:47 +00:00
Gerald Squelart
86d527a38c Bug 1592496 - Add move constructor and assignment to nsMainThreadPtrHandle - r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D51055

--HG--
extra : moz-landing-system : lando
2019-10-30 20:33:31 +00:00
Boris Zbarsky
3ae961a2da Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug
We could try to move the EnforcePendingTaskGuarantee() bit into
PeekIdleDeadline, but then we'd need to check HasReadyEvent() on
mDeferredTimersQueue and mIdleQueue before we possibly unlock the mutex under
PeekIdleDeadline, and it's not clear that that state cannot change once the
mutex is unlocked...

The EnsureIsActive() call at the end of GetIdleDeadlineInternal in the !aIsPeek
case only makes sense if there are in fact idle tasks available to run when
GetDeadlineForIdleTask is called, because otherwise it would incorrectly set us
active when we are not running any tasks.

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

--HG--
rename : xpcom/threads/PrioritizedEventQueue.cpp => xpcom/threads/IdlePeriodState.cpp
rename : xpcom/threads/PrioritizedEventQueue.h => xpcom/threads/IdlePeriodState.h
extra : moz-landing-system : lando
2019-10-20 15:08:44 +00:00
Cosmin Sabou
68c31e0e43 Backed out changeset 798bab343a0a (bug 1589561) for turning bug 1586420 into permafail. CLOSED TREE
--HG--
extra : amend_source : 1c548e9a10e27ff6a50d98f15a701dcd1c717544
2019-10-18 23:04:26 +03:00
Boris Zbarsky
4a394c3f69 Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug
We could try to move the EnforcePendingTaskGuarantee() bit into PeekIdleDeadline, but
then we'd need to check HasReadyEvent() on mDeferredTimersQueue and mIdleQueue
before we unlock the mutex and PeekIdleDeadline, and it's not clear that that
state cannot change once the mutex is unlocked...

The EnsureIsActive() call at the end of GetIdleDeadlineInternal in the !aIsPeek
case only makes sense if there are in fact idle tasks available to run when
GetDeadlineForIdleTask is called, because otherwise it would incorrectly set us
active when we are not running any tasks.

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

--HG--
rename : xpcom/threads/PrioritizedEventQueue.cpp => xpcom/threads/IdlePeriodState.cpp
rename : xpcom/threads/PrioritizedEventQueue.h => xpcom/threads/IdlePeriodState.h
extra : moz-landing-system : lando
2019-10-18 17:28:50 +00:00
Olli Pettay
80527a72bf Bug 1589345 - Fix a leftover comment to tell what PrioritizedEventQueue::mActive actually does, r=farre
EnsureIsActive is called in two places, one is for non-idle tasks, the other for idle tasks
https://searchfox.org/mozilla-central/rev/97976753a21c1731e18177de9e5ce78ea3b3da2d/xpcom/threads/PrioritizedEventQueue.cpp#212-214,286,288,303

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

--HG--
extra : moz-landing-system : lando
2019-10-18 10:35:47 +00:00
Sylvestre Ledru
f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Gabriele Svelto
3e93e048a8 Bug 1584969 - Use nsMaybeWeakPtr to simplify the nsIProcess implementation r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47601

--HG--
extra : moz-landing-system : lando
2019-09-30 18:28:31 +00:00
Dorel Luca
fd7b19e2eb Backed out changeset 9364cff86a7e (bug 1584568) by dev's request
--HG--
extra : rebase_source : 2e7ac1ee673380994328df1d6436235895d5b5e3
2019-09-27 23:54:11 +03:00
Nathan Froyd
e284917829 Bug 1584568 - add a way to get the background event target; r=KrisWright
This function is needed for people whose needs don't map cleanly to
`NS_DispatchToBackgroundThread`, usually because they're using the event
target to do thread consistency checks.  Once we have this function, we
can start converting singleton threads/thread pools that want to use
functionality like the above.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 17:16:40 +00:00
Nathan Froyd
580e41da6a Bug 1584339 - move background event target logic into a separate class; r=KrisWright
Eventually, we're going to want to hand out an `nsIEventTarget*` to people
wanting to dispatch to background threads, but for whatever reason not
wanting to use the `NS_DispatchToBackgroundThread` API (probably because
they want to verify correctness by checking that certain methods are, in
fact, running on the background event target).  And because we're going to
want to have some sort of division between CPU-bound and IO-bound tasks, we
can't just hand out references to a single thread pool.  We need some sort
of intermediate object for both of these goals, and that is what the added
`BackgroundEventTarget` class is.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 15:30:34 +00:00
Brian Hackett
7a471baa7e Bug 1483398 - Disable idle scheduler when recording/replaying, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D47257

--HG--
extra : moz-landing-system : lando
2019-09-26 20:20:11 +00:00
Nathan Froyd
5a3128b973 Bug 1583964 - make IsOnCurrentThread for thread pools constant-time; r=KrisWright
It's fairly common for clients to hold a pointer to some private thread
and then inquire about `IsOnCurrentThread` in debug checks.  As we
migrate these private threads into some `nsIEventTarget` implementation
that might be running on thread pools, we need to ensure that those
`IsOnCurrentThread` continues to be relatively cheap.  The current
implementation for thread pools is not particularly efficient.

The inefficiency comes from having to iterate over all the threads in
the pool.  But there's no need to do this; we can just have each thread
set a particular thread-local variable to the thread pool it's running
on, and check the value of that thread-local variable instead.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 22:02:08 +00:00
Josh Aas
ec1207f341 Bug 1450059 - part 1 - add a NS_DispatchToBackgroundThread function; r=KrisWright
We have a number of people starting up singleton threads for the sole
purpose of running a single runnable on them.  These consumers often
leave the thread running until some point close to shutdown, or they
never shut it down at all.  Let's add a helper function to do the thing
they actually want to do, and then we can modify the implementation of
that function as necessary as we merge singleton threads (and even
thread pools) together.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 04:03:28 +00:00
Mihai Alexandru Michis
4e1448e7e6 Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE
Backed out changeset cb739de6606d (bug 1510226)
Backed out changeset b6f670610dc3 (bug 1510226)
2019-09-25 04:25:07 +03:00
Doug Thayer
ecdf4c1ca3 Bug 1510226 - Do not block main thread in nsThread::Init r=froydnj
To remove the blocking inside nsThread::Init, two things needed
to happen:

- Switch the ThreadInitData value passed as the argument for
  ThreadFunc to a heap allocation, so that it can outlive the call
  to nsThread::Init.
- Initialize mThread and mEventTarget->mThread to the return
  value of PR_CreateThread, so that to the callers, checks which
  depend on these values being set can continue to function.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 21:07:04 +00:00
Doug Thayer
65be2b22c1 Bug 1510226 - Remove vestigial references to cooperative scheduling r=froydnj
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 18:03:11 +00:00
Olli Pettay
1d1349d4bf Bug 1563063 - Cross-process idle handling, r=farre
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)

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

--HG--
extra : moz-landing-system : lando
2019-09-24 14:33:57 +00:00
Jean-Yves Avenard
912b0df630 Bug 1575744 - P4. Add MozPromise::FromDomPromise. r=bholley
Similar to MozPromise::FromGeckoResult.

Allows to create a MozPromise that will be resolved/rejected when the JS promise does the same.
It would be nice to be able to chain the two promise types, but it would be an additional effort.
MozPromise::FromDomPromise is limited to primitive types only and the reject value type must be nsresult.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 04:09:46 +00:00
arthur.iakab
a595388e84 Backed out changeset 5ed078313a10 (bug 1563063)for causing browser-chrome failures on browser_test_feature_preferencereads.js a=backout 2019-09-21 16:36:09 +03:00
Olli Pettay
a1f7c1bbdf Bug 1563063 - Cross-process idle handling, r=farre
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)

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

--HG--
extra : moz-landing-system : lando
2019-09-20 19:31:58 +00:00
Bogdan Tara
bee28f01d7 Backed out 8 changesets (bug 1575744) for HttpChannelParent related assertion failures
Backed out changeset af61675dd488 (bug 1575744)
Backed out changeset bf794b9373c8 (bug 1575744)
Backed out changeset 39ffb74d2e12 (bug 1575744)
Backed out changeset c1547b3df672 (bug 1575744)
Backed out changeset 382ee8672027 (bug 1575744)
Backed out changeset 5abb38484f11 (bug 1575744)
Backed out changeset d5244c1bbfe8 (bug 1575744)
Backed out changeset c74b81debf73 (bug 1575744)

--HG--
rename : netwerk/base/nsIProcessSwitchRequestor.idl => netwerk/base/nsICrossProcessSwitchChannel.idl
2019-09-20 06:58:44 +03:00
Jean-Yves Avenard
bafae6af97 Bug 1575744 - P4. Add MozPromise::FromDomPromise. r=bholley
Similar to MozPromise::FromGeckoResult.

Allows to create a MozPromise that will be resolved/rejected when the JS promise does the same.
It would be nice to be able to chain the two promise types, but it would be an additional effort.
MozPromise::FromDomPromise is limited to primitive types only and the reject value type must be nsresult.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 02:21:12 +00:00
Bogdan Tara
7e0aba7d00 Backed out changeset b0c0887e223c (bug 1563063) for browser_test_feature_preferencereads and browser_test_profile_multi_frame_page_info failures CLOSED TREE 2019-09-19 23:18:06 +03:00
Olli Pettay
bcf140f437 Bug 1563063 - Cross-process idle handling, r=farre
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)

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

--HG--
extra : moz-landing-system : lando
2019-09-18 23:53:42 +00:00
Chris H-C
457b8d15c8 Bug 1577937 - StaticDataMutex for when you want a DataMutex but Static r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45558

--HG--
extra : moz-landing-system : lando
2019-09-12 19:58:01 +00:00
Tom Ritter
be6c896158 Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto
EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 04:40:11 +00:00
Razvan Maries
b7da3be2b0 Backed out 3 changesets (bug 1575974) for xpcshell perma fails on test_nsIProcess.js. CLOSED TREE
Backed out changeset e32925d2b886 (bug 1575974)
Backed out changeset a9512bb19ea7 (bug 1575974)
Backed out changeset 521655c73cd1 (bug 1575974)
2019-09-11 00:23:26 +03:00
Tom Ritter
c925942e2d Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto
EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

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

--HG--
extra : moz-landing-system : lando
2019-09-10 18:01:29 +00:00
Dorel Luca
17bf280715 Backed out 3 changesets (bug 1575974) for MinGW build bustage. CLOSED TREE
Backed out changeset cc4a00226229 (bug 1575974)
Backed out changeset 225d858fe335 (bug 1575974)
Backed out changeset 1dc0b5a41dc8 (bug 1575974)
2019-09-10 18:39:44 +03:00
Tom Ritter
323d7cb7e2 Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto
EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

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

--HG--
extra : moz-landing-system : lando
2019-09-10 10:44:10 +00:00
Simon Giesecke
a7b804f7af Bug 1575479 - Encapsulate mBaseHashtableET::mData. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45004

--HG--
extra : moz-landing-system : lando
2019-09-10 13:51:09 +00:00
Coroiu Cristina
77681b7832 Backed out 2 changesets (bug 1575479) for build bustage at build/src/gfx/thebes/gfxFT2Fonts.h on a CLOSED TREE
Backed out changeset dcbc7c69fb64 (bug 1575479)
Backed out changeset 6d54a8115393 (bug 1575479)
2019-09-10 15:01:10 +03:00
Simon Giesecke
dda41fa097 Bug 1575479 - Encapsulate mBaseHashtableET::mData. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45004

--HG--
extra : moz-landing-system : lando
2019-09-06 14:14:06 +00:00
Gerald Squelart
95f77c2409 Bug 1576819 - Use PROFILER_ADD_MARKER{,_WITH_PAYLOAD} everywhere - r=gregtatum
All calls to `profiler_add_marker()` (outside of the profilers code) are
now replaced by either:
- `PROFILER_ADD_MARKER(name, categoryPair)`
- `PROFILER_ADD_MARKER_WITH_PAYLOAD(name, categoryPair, TypeOfMarkerPayload,
                                    (payload, ..., arguments))`

This makes all calls consistent, and they won't need to prefix the category pair
with `JS::ProfilingCategoryPair::`.

Also it will make it easier to add (and later remove) internal-profiling
instrumentation (bug 1576550), and to replace heap-allocated payloads with
stack-allocated ones (bug 1576555).

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

--HG--
extra : moz-landing-system : lando
2019-09-04 07:56:51 +00:00
Nathan Froyd
f7a731abd5 Bug 1573160 - shutdown newly-spawned threads if we're shutting down; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D41551

--HG--
extra : moz-landing-system : lando
2019-08-15 17:29:26 +00:00
Nathan Froyd
87c432d06a Bug 1570982 - remove CPP_THROW_NEW; r=glandium
We always define it to the same thing, and we're inconsistent in whether
we use `CPP_THROW_NEW` or `throw()`, so we might as well just use the
standard C++ thing and get rid of some baggage.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 01:32:41 +00:00
Aaron Klotz
fb977a3526 Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell
Depends on D40885

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

--HG--
extra : moz-landing-system : lando
2019-08-07 15:58:09 +00:00
Cameron McCormack
d075470483 Bug 1053379 - Simplify CodeAddressService so non-DMD users can rely on defaults. r=njn
None of the StringTable implementations were freeing their strdup'd
strings, either.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 21:58:12 +00:00
Bobby Holley
c14858c637 Bug 1571092 - Mark various MozPromise-returning methods MOZ_MUST_USE. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D40528

--HG--
extra : moz-landing-system : lando
2019-08-05 20:10:58 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Bobby Holley
5d23efb2eb Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 21:10:14 +00:00
Coroiu Cristina
f3386dea34 Backed out 4 changesets (bug 1566583) for apilint and checkstyle failure at geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java on a CLOSED TREE
Backed out changeset 3700ef585384 (bug 1566583)
Backed out changeset fbc829be6c4f (bug 1566583)
Backed out changeset 14ea9c84bb0e (bug 1566583)
Backed out changeset 92f3b1bb34a4 (bug 1566583)
2019-07-24 22:59:54 +03:00
Bobby Holley
53719788a1 Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 19:19:40 +00:00
Olli Pettay
7f18b121db Bug 1566573, Add prefs to control idle time limits, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D38242

--HG--
extra : moz-landing-system : lando
2019-07-17 09:19:44 +00:00
Olli Pettay
5474e37783 Bug 1566459, add a way to check underlying IPC message type from runnable, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D38215

--HG--
extra : moz-landing-system : lando
2019-07-16 19:21:40 +00:00
Olli Pettay
9eeb5dab4f Bug 1541229, higher minimum idle period during page load, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D37908

--HG--
extra : moz-landing-system : lando
2019-07-16 12:07:49 +00:00
Nika Layzell
eb98932636 Bug 1561783 - Make nsThread::mIsMainThread a bool, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D36142

--HG--
extra : moz-landing-system : lando
2019-06-27 00:37:53 +00:00
Jon Coppeard
ace8608f82 Bug 1560931 - Fire memory-pressure-stop events on Windows r=gsvelto
I'd like to rely on always getting a stop event when the system recovers from a memory pressure situation.  AIUI this already happens on Android platforms but not on Windows.  This adds the stop event for Windows.

Differential Revision: https://phabricator.services.mozilla.com/D35679
2019-06-24 18:22:53 +01:00
Olli Pettay
c6b69378d0 Bug 1559220 - Special case IndexedDB threads in wakeup telemetry, r=erahm
The approach isn't perhaps super elegant, but it is a small and simple tweak.

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

--HG--
extra : moz-landing-system : lando
2019-06-16 21:03:45 +00:00
Olli Pettay
2d108f18b0 Bug 1554292 - Add simple telemetry probe to gather information about threads' wakeup frequency, r=erahm
This patch takes the approach to count up to 100 wakeups and reports then time it took for that period. Regression in wakeups could
show up as decreased mean or median time.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 20:26:09 +00:00
Bob Owen
387477fb68 Bug 1464032 Part 12: Add CanvasParent, CanvasChild and RecordedTextureData. r=mattwoodrow, jld
RecordedTextureData records TextureData calls for play back in the GPU process.
CanvasChild and CanvasParent set up the recorder and translator.
They also help to manage the starting of translation and co-ordinating the
translation with the frame transactions.
This patch also includes other changes to wire up recording and playback.
2018-12-02 14:19:11 +00:00
Jean-Yves Avenard
e4ba671378 Bug 1552643 - P3. rename medium_high_event_queue.enabled pref. r=froydnj
To make it more inline other preferences naming.

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

--HG--
extra : moz-landing-system : lando
2019-05-26 15:00:09 +00:00
Sylvestre Ledru
d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
Gurzau Raul
967bc2a754 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard
7160d797f9 Bug 1552643 - P3. rename medium_high_event_queue.enabled pref. r=froydnj
To make it more inline other preferences naming.

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

--HG--
extra : moz-landing-system : lando
2019-05-25 02:03:21 +00:00
Randell Jesup
a859c53225 Bug 1553856: LazyIdleThread should set names for the nsThreads it spawns r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D32385

--HG--
extra : moz-landing-system : lando
2019-05-24 12:50:05 +00:00
arthur.iakab
af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru
c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Sylvestre Ledru
993c03acb1 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D31769

--HG--
extra : moz-landing-system : lando
2019-05-22 22:37:14 +00:00
Jim Blandy
05a97e08e4 Bug 1553567: Use MaxValue to initialize/reset nsThread::mCurrentEventLoopDepth, not -1. r=froydnj
Since the purpose of mCurrentEventLoopDepth is to be ordered in comparison with
mNestedEventLoopDepth, it's a bit deceptive to give it a value that would appear
to be less than any reasonable depth but is, because the variables in question
are unsigned, actually greater than any reasonable depth. Using
mozilla::MaxValue<uint32_t>::value is clearer.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 10:22:57 +00:00
Olli Pettay
fa04ddd3c2 Bug 1552958 - De-templatize PrioritizedEventQueue, r=froydnj
PrioritizedEventQueue's template is always EventQueue, so the template
argument is rather useless.
Trying to keep the patch minimal, so CreateMainThread for example is still
a bit weird.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 18:20:34 +00:00
Sean Feng
170e44e58f Bug 1534012 - Use a low priority ThrottledEventQueue for postMessages during page load r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27386

--HG--
extra : moz-landing-system : lando
2019-05-16 19:35:30 +00:00
Olli Pettay
bf41b4d6d7 Bug 1551203, Bug 1551203 - Give ThrottledEventQueues names, r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D30920

--HG--
extra : moz-landing-system : lando
2019-05-13 18:12:24 +00:00
Jean-Yves Avenard
e0f0e16680 Bug 1548795 - P2. Remove dom.performance.enable_scheduler_timing preference. r=tarek
Differential Revision: https://phabricator.services.mozilla.com/D30467

--HG--
extra : moz-landing-system : lando
2019-05-09 23:12:12 +00:00
Brindusan Cristian
ba4f64421f Backed out changeset 7fa8e33635fc (bug 1534012) for wpt failures at promise-rejection-events.html. CLOSED TREE 2019-05-10 01:10:40 +03:00
Sean Feng
87884c39a6 Bug 1534012 - Use a low priority ThrottledEventQueue for postMessages during page load r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27386

--HG--
extra : moz-landing-system : lando
2019-05-09 14:43:40 +00:00
Nathan Froyd
482490a2df Bug 1548562 - require nsThread::Init to take a name; r=baku
There's no good reason why we should let unnamed threads through this interface.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 16:05:50 +00:00
Byron Campen [:bwc]
af20a470c6 Bug 1545120: Simplify this callback management stuff a little. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D27914

--HG--
extra : moz-landing-system : lando
2019-04-18 14:53:18 +00:00
Gabriele Svelto
ea01f0aed2 Bug 1386760 - Remove the ExecutableName annotation r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D27885

--HG--
extra : moz-landing-system : lando
2019-04-17 14:05:42 +00:00
Olli Pettay
b024b00b94 Bug 1515216, ensure IdleTaskRunners are added only once to RefreshDriver's idle runnable list, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27424

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

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

--HG--
extra : moz-landing-system : lando
2019-04-09 21:13:16 +00:00
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Randall E. Barker
1d15aad0e5 Bug 1541282 - Use native call in NS_SetCurrentThreadName() on Android r=froydnj
PR_SetCurrentThreadName() is broken on Android (Bug 1541216).
In order to work around this issue, NS_SetCurrentThreadName() will
call  prctl(PR_SET_NAME, name) until the underlying nspr can be
fixed.

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

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

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Nathan Froyd
aed549848b Bug 1539815 - move inner queue creation into the PrioritizedEventQueue constructor; r=erahm
Outside code shouldn't have to care how many levels of priority
PrioritizedEventQueue manages.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 20:37:09 +00:00
Boris Zbarsky
6ed8efae89 Bug 1539499. Make nsITimer builtinclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D25191

--HG--
extra : moz-landing-system : lando
2019-03-28 13:09:03 +00:00
Lina Cambridge
35f0c7a7f9 Bug 1482608 - Add owning thread pointer holders for Rust code. r=nika,myk
This commit adds `ThreadPtr{Handle, Holder}` to wrap an `XpCom` object
with thread-safe refcounting. These are analagous to
`nsMainThreadPtr{Handle, Holder}`, but can hold references to
objects from any thread, not just the main thread.

`ThreadPtrHolder` is similar to `ThreadBoundRefPtr`. However, it's
not possible to clone a `ThreadBoundRefPtr`, so it can't be shared
among tasks. This is fine for objects that are only used once, like
callbacks. However, `ThreadBoundRefPtr` doesn't work well for loggers
or event emitters, which might need to be called multiple times on
the owning thread.

Unlike a `ThreadBoundRefPtr`, it's allowed and expected to
clone and drop a `ThreadPtrHolder` on other threads. Internally,
the holder keeps an atomic refcount, and releases the wrapped object
on the owning thread once the count reaches zero.

This commit also changes `TaskRunnable` to support dispatching from
threads other than the main thread.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 04:49:24 +00:00
Boris Zbarsky
081fa29a04 Bug 1536719. Fix handling of member method calls in the MOZ_CAN_RUN_SCRIPT analysis. r=andi
The old code for member method calls did the following:

 1) Find the member method calls.
 2) Look at their "this" expression.
 3) If the "this" is an operator call, check for any of the arguments of the
    operator call being invalid.
 4) Otherwise (if not an operator call) check for the "this" value being
    invalid.

This wasn't right, because the "is invalid" check checks the type and only
considers refcounted things.  So if the code looked something like
"foo[i]->call_method()", we would look at the types of "foo" and "i" and
determine that none of those are refcounted types so there is nothing invalid
here (since "foo" is some sort of array type and "i" is an integer).  The new
setup just checks whether the "this" value is invalid, which does the type
check on the "this" value itself; in the "foo[i]->call_method()" case on
"foo[i]".  We then adjust the exclusions in InvalidArg to consider operator->
on known-live things valid, to allow the thing that we were really trying to
accomplish with the "check for an operator call" bits:
"stackRefPtr->some_method()".

The test coverage being added for the made-up TArray type is meant to catch
things like the geolocation issue that was being hidden by the buggy behavior.
I'm not using nsTArray itself because some header included by nsTArray.h
tries to define operator new/delete bits inline and that triggers warnings that
then cause a clang-plugin test failure, because they're unexpected.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 11:48:33 +00:00
Brindusan Cristian
044c3936c7 Backed out 6 changesets (bug 1536736, bug 1536336, bug 1536719, bug 1536825, bug 1537537, bug 1536724) for build bustages at TestCanRunScript. CLOSED TREE
Backed out changeset f754116e738e (bug 1537537)
Backed out changeset f9df48cfea43 (bug 1536736)
Backed out changeset 7a9888e700cf (bug 1536825)
Backed out changeset e2551303c5cf (bug 1536724)
Backed out changeset f497ce3b7419 (bug 1536719)
Backed out changeset fd59264c47c1 (bug 1536336)
2019-03-21 07:33:33 +02:00
Boris Zbarsky
14f6385d4b Bug 1536719. Fix handling of member method calls in the MOZ_CAN_RUN_SCRIPT analysis. r=andi
The old code for member method calls did the following:

 1) Find the member method calls.
 2) Look at their "this" expression.
 3) If the "this" is an operator call, check for any of the arguments of the
    operator call being invalid.
 4) Otherwise (if not an operator call) check for the "this" value being
    invalid.

This wasn't right, because the "is invalid" check checks the type and only
considers refcounted things.  So if the code looked something like
"foo[i]->call_method()", we would look at the types of "foo" and "i" and
determine that none of those are refcounted types so there is nothing invalid
here (since "foo" is some sort of array type and "i" is an integer).  The new
setup just checks whether the "this" value is invalid, which does the type
check on the "this" value itself; in the "foo[i]->call_method()" case on
"foo[i]".  We then adjust the exclusions in InvalidArg to consider operator->
on known-live things valid, to allow the thing that we were really trying to
accomplish with the "check for an operator call" bits:
"stackRefPtr->some_method()".

The test coverage being added for the made-up TArray type is meant to catch
things like the geolocation issue that was being hidden by the buggy behavior.
I'm not using nsTArray itself because some header included by nsTArray.h
tries to define operator new/delete bits inline and that triggers warnings that
then cause a clang-plugin test failure, because they're unexpected.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 18:08:16 +00:00
Honza Bambas
6bf4c529b1 Bug 1536129 - Fix !MOZ_CALLSTACK_DISABLED blocking resource acquisition checking, r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D23882

--HG--
extra : moz-landing-system : lando
2019-03-19 17:12:42 +00:00
Honza Bambas
87dbb69b5b Bug 1535361 - Let stream transport service idle with 5 threads instead of only one to not create/kill threads in quick bursts; add option to thread pool to shorten the idle timeout progressively with number of idle thread to save memory, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D23845

--HG--
extra : moz-landing-system : lando
2019-03-19 14:35:12 +00:00
Valentin Gosu
87e9bbff49 Bug 1532253 - Add NS_NewURIOnAnyThread r=baku
Differential Revision: https://phabricator.services.mozilla.com/D22137

--HG--
extra : moz-landing-system : lando
2019-03-19 15:11:31 +00:00
Chris Peterson
e9d64cd221 Bug 1534878 - xpcom: #include headers for global functions' declarations. r=erahm
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called). The .cpp files defining these functions did not include the headers with the corresponding function prototypes used by other compilation units. Including a header file in its corresponding .cpp file can help catch mismatched declarations and definitions.

xpcom/components/nsCategoryManager.cpp:637:6 [-Wmissing-prototypes] no previous prototype for function 'NS_CreateServicesFromCategory'
xpcom/io/nsPipe3.cpp:1824:10 [-Wmissing-prototypes] no previous prototype for function 'nsPipeConstructor'
xpcom/io/nsStringStream.cpp:475:10 [-Wmissing-prototypes] no previous prototype for function 'nsStringInputStreamConstructor'
xpcom/threads/ThreadDelay.cpp:18:6 [-Wmissing-prototypes] no previous prototype for function 'DelayForChaosMode'

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

--HG--
extra : rebase_source : a2085a090394a5d3f5c319258b782a5d9f217751
extra : source : 18c3e569ff15987eb200c62eaa9f4943ff08cb25
2019-03-07 23:32:54 -08:00
Chris Peterson
d5e552f528 Bug 1534878 - xpcom: Make some global functions static. r=erahm
clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

xpcom/base/Logging.cpp:85:13 [-Wmissing-prototypes] no previous prototype for function 'ToLogStr'
xpcom/base/Logging.cpp:132:13 [-Wmissing-prototypes] no previous prototype for function 'ExpandPIDMarker'
xpcom/base/LogModulePrefWatcher.cpp:37:6 [-Wmissing-prototypes] no previous prototype for function 'ResetExistingPrefs'
xpcom/base/LogModulePrefWatcher.cpp:109:6 [-Wmissing-prototypes] no previous prototype for function 'LoadExistingPrefs'
xpcom/base/nsCycleCollector.cpp:212:6 [-Wmissing-prototypes] no previous prototype for function 'SuspectUsingNurseryPurpleBuffer'
xpcom/components/nsComponentManager.cpp:421:31 [-Wmissing-prototypes] no previous prototype for function 'begin'
xpcom/components/nsComponentManager.cpp:427:31 [-Wmissing-prototypes] no previous prototype for function 'end'
xpcom/ds/Dafsa.cpp:23:6 [-Wmissing-prototypes] no previous prototype for function 'GetNextOffset'
xpcom/ds/Dafsa.cpp:55:6 [-Wmissing-prototypes] no previous prototype for function 'IsEOL'
xpcom/ds/Dafsa.cpp:62:6 [-Wmissing-prototypes] no previous prototype for function 'IsMatch'
xpcom/ds/Dafsa.cpp:70:6 [-Wmissing-prototypes] no previous prototype for function 'IsEndCharMatch'
xpcom/ds/Dafsa.cpp:78:6 [-Wmissing-prototypes] no previous prototype for function 'GetReturnValue'
xpcom/ds/Dafsa.cpp:91:5 [-Wmissing-prototypes] no previous prototype for function 'LookupString'
xpcom/io/CocoaFileUtils.mm:195:13 [-Wmissing-prototypes] no previous prototype for function 'GetQuarantinePropKey'
xpcom/io/CocoaFileUtils.mm:203:24 [-Wmissing-prototypes] no previous prototype for function 'CreateQuarantineDictionary'
xpcom/rust/gtest/bench-collections/Bench.cpp:65:11 [-Wmissing-prototypes] no previous prototype for function 'MyRand'
xpcom/rust/gtest/bench-collections/Bench.cpp:85:6 [-Wmissing-prototypes] no previous prototype for function 'Bench_Cpp_unordered_set'
xpcom/rust/gtest/bench-collections/Bench.cpp:125:6 [-Wmissing-prototypes] no previous prototype for function 'Bench_Cpp_PLDHashTable'
xpcom/rust/gtest/bench-collections/Bench.cpp:166:6 [-Wmissing-prototypes] no previous prototype for function 'Bench_Cpp_MozHashSet'
xpcom/tests/gtest/TestAtoms.cpp:114:6 [-Wmissing-prototypes] no previous prototype for function 'isStaticAtom'
xpcom/tests/gtest/TestCallTemplates.cpp:72:6 [-Wmissing-prototypes] no previous prototype for function 'JustTestingCompilation'
xpcom/tests/gtest/TestCOMPtr.cpp:87:10 [-Wmissing-prototypes] no previous prototype for function 'CreateIFoo'
xpcom/tests/gtest/TestCOMPtr.cpp:98:6 [-Wmissing-prototypes] no previous prototype for function 'set_a_IFoo'
xpcom/tests/gtest/TestCOMPtr.cpp:105:16 [-Wmissing-prototypes] no previous prototype for function 'return_a_IFoo'
xpcom/tests/gtest/TestCOMPtr.cpp:164:10 [-Wmissing-prototypes] no previous prototype for function 'CreateIBar'
xpcom/tests/gtest/TestCOMPtr.cpp:175:6 [-Wmissing-prototypes] no previous prototype for function 'AnIFooPtrPtrContext'
xpcom/tests/gtest/TestCOMPtr.cpp:177:6 [-Wmissing-prototypes] no previous prototype for function 'AVoidPtrPtrContext'
xpcom/tests/gtest/TestCOMPtr.cpp:179:6 [-Wmissing-prototypes] no previous prototype for function 'AnISupportsPtrPtrContext'
xpcom/tests/gtest/TestCOMPtr.cpp:263:6 [-Wmissing-prototypes] no previous prototype for function 'Comparison'
xpcom/tests/gtest/TestCOMPtr.cpp:298:6 [-Wmissing-prototypes] no previous prototype for function 'DontAddRef'
xpcom/tests/gtest/TestCRT.cpp:17:5 [-Wmissing-prototypes] no previous prototype for function 'sign'
xpcom/tests/gtest/TestDeadlockDetector.cpp:62:6 [-Wmissing-prototypes] no previous prototype for function 'DisableCrashReporter'
xpcom/tests/gtest/TestDeadlockDetector.cpp:74:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:95:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity2_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:159:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity4_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:182:5 [-Wmissing-prototypes] no previous prototype for function 'Sanity5_Child'
xpcom/tests/gtest/TestDeadlockDetector.cpp:303:5 [-Wmissing-prototypes] no previous prototype for function 'ContentionNoDeadlock_Child'
xpcom/tests/gtest/TestHashtables.cpp:88:6 [-Wmissing-prototypes] no previous prototype for function 'testTHashtable'
xpcom/tests/gtest/TestHashtables.cpp:205:10 [-Wmissing-prototypes] no previous prototype for function 'CreateIFoo'
xpcom/tests/gtest/TestMoveString.cpp:25:6 [-Wmissing-prototypes] no previous prototype for function 'SetAsOwned'
xpcom/tests/gtest/TestMoveString.cpp:34:6 [-Wmissing-prototypes] no previous prototype for function 'ExpectTruncated'
xpcom/tests/gtest/TestMoveString.cpp:40:6 [-Wmissing-prototypes] no previous prototype for function 'ExpectNew'
xpcom/tests/gtest/TestMruCache.cpp:52:11 [-Wmissing-prototypes] no previous prototype for function 'MakeStringKey'
xpcom/tests/gtest/TestMultiplexInputStream.cpp:106:34 [-Wmissing-prototypes] no previous prototype for function 'CreateStreamHelper'
xpcom/tests/gtest/TestNonBlockingAsyncInputStream.cpp:62:10 [-Wmissing-prototypes] no previous prototype for function 'ReadSegmentsFunction'
xpcom/tests/gtest/TestNsDeque.cpp:240:6 [-Wmissing-prototypes] no previous prototype for function 'CheckIfQueueEmpty'
xpcom/tests/gtest/TestNsRefPtr.cpp:105:10 [-Wmissing-prototypes] no previous prototype for function 'CreateFoo'
xpcom/tests/gtest/TestNsRefPtr.cpp:116:6 [-Wmissing-prototypes] no previous prototype for function 'set_a_Foo'
xpcom/tests/gtest/TestNsRefPtr.cpp:123:13 [-Wmissing-prototypes] no previous prototype for function 'return_a_Foo'
xpcom/tests/gtest/TestNsRefPtr.cpp:391:6 [-Wmissing-prototypes] no previous prototype for function 'AnFooPtrPtrContext'
xpcom/tests/gtest/TestNsRefPtr.cpp:392:6 [-Wmissing-prototypes] no previous prototype for function 'AVoidPtrPtrContext'
xpcom/tests/gtest/TestPLDHash.cpp:33:6 [-Wmissing-prototypes] no previous prototype for function 'TestCrashyOperation'
xpcom/tests/gtest/TestPipes.cpp:98:10 [-Wmissing-prototypes] no previous prototype for function 'TestPipe'
xpcom/tests/gtest/TestPipes.cpp:212:10 [-Wmissing-prototypes] no previous prototype for function 'TestShortWrites'
xpcom/tests/gtest/TestPipes.cpp:354:6 [-Wmissing-prototypes] no previous prototype for function 'RunTests'
xpcom/tests/gtest/TestPLDHash.cpp:90:6 [-Wmissing-prototypes] no previous prototype for function 'InitCapacityOk_InitialLengthTooBig'
xpcom/tests/gtest/TestPLDHash.cpp:95:6 [-Wmissing-prototypes] no previous prototype for function 'InitCapacityOk_InitialEntryStoreTooBig'
xpcom/tests/gtest/TestPLDHash.cpp:102:6 [-Wmissing-prototypes] no previous prototype for function 'InitCapacityOk_EntrySizeTooBig'
xpcom/tests/gtest/TestSlicedInputStream.cpp:111:20 [-Wmissing-prototypes] no previous prototype for function 'CreateSeekableStreams'
xpcom/tests/gtest/TestSlicedInputStream.cpp:125:20 [-Wmissing-prototypes] no previous prototype for function 'CreateNonSeekableStreams'
xpcom/tests/gtest/TestStrings.cpp:471:6 [-Wmissing-prototypes] no previous prototype for function 'test_assign_helper'
xpcom/tests/gtest/TestTArray.cpp:60:22 [-Wmissing-prototypes] no previous prototype for function 'DummyArray'
xpcom/tests/gtest/TestTArray.cpp:72:22 [-Wmissing-prototypes] no previous prototype for function 'FakeHugeArray'
xpcom/tests/gtest/TestThrottledEventQueue.cpp:96:6 [-Wmissing-prototypes] no previous prototype for function 'Enqueue'
xpcom/threads/BlockingResourceBase.cpp:86:6 [-Wmissing-prototypes] no previous prototype for function 'PrintCycle'
xpcom/threads/CPUUsageWatcher.cpp:41:10 [-Wmissing-prototypes] no previous prototype for function 'GetMicroseconds'
xpcom/threads/CPUUsageWatcher.cpp:46:10 [-Wmissing-prototypes] no previous prototype for function 'GetMicroseconds'
xpcom/threads/CPUUsageWatcher.cpp:51:40 [-Wmissing-prototypes] no previous prototype for function 'GetProcessCPUStats'
xpcom/threads/CPUUsageWatcher.cpp:80:40 [-Wmissing-prototypes] no previous prototype for function 'GetGlobalCPUStats'
xpcom/threads/nsTimerImpl.cpp:196:21 [-Wmissing-prototypes] no previous prototype for function 'GetTimerFiringsLog'

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

--HG--
extra : rebase_source : e03df033209e0a08fc263603e78bc16a09467f15
extra : source : 3beec9fbfdedf346fff85309029e7805717958ac
2019-02-24 17:35:59 -08:00
Coroiu Cristina
24aacfe9a4 Merge inbound to mozilla-central a=merge 2019-03-07 06:34:11 +02:00
Yaron Tausky
43054fe975 Bug 1516277 - Add local execution mode to nsThread r=janv,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21241

--HG--
extra : moz-landing-system : lando
2019-03-06 16:26:07 +00:00
Gurzau Raul
d5392415e2 Backed out changeset 44d83d32e254 (bug 1516277) for failing at /test/unit/test_eviction.js on a CLOSED TREE. 2019-03-06 17:50:28 +02:00
Yaron Tausky
3aa9896ebc Bug 1516277 - Add local execution mode to nsThread r=janv,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21241

--HG--
extra : moz-landing-system : lando
2019-03-06 13:53:16 +00:00
Olli Pettay
1b790f3246 Bug 1522316, use medium high priority queue for worker->main thread control messages, r=baku
If main thread is busy handling runnables in the normal priority queue, control-type of messages from
workers are possibly postponed to run after those. That can lead to bad performance, if the page
expects workers to be able to proceed simultanously with the main thread.
This patch makes the control messages to use medium high priority queue in order to try to
ensure they are handled in timely manner.
Pref dom.worker.use_medium_high_event_queue can be set to false to disable this new behavior.

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

--HG--
extra : rebase_source : 447dec6dbcccaa0206a1815c21ccf713c523fc91
2019-03-05 18:47:05 +02:00
Ryan Hunt
f4a515c179 Bug 1523969 part 27 - Move method definition inline comments to new line in 'xpcom/'. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D21131

--HG--
extra : rebase_source : 514f36238d908de221a0116f8e8a5d0cf18a168c
extra : histedit_source : 85743d2586a7307738866ce145b93dae2a664cf3
2019-02-25 16:14:01 -06:00
Olli Pettay
02b99e9b8a Bug 1524006 - Add a medium-high priority queue between high and normal, r=froydnj
--HG--
extra : rebase_source : ea24f15c5ce6ad3e4597be902fa0eafda0d06033
2019-02-28 22:38:53 +02:00
Jed Davis
5cc3212784 Bug 1506291 - Move the AV1 decoders to a sandbox-friendly CPU counting wrapper. r=gcp,mjf
Counting CPUs accesses the filesystem (sysfs or procfs), which we'd like
to disallow when sandboxed if possible, and fails silently if access
is denied.  Because the CPU count rarely changes, this patch handles
that problem for the RDD process by caching a copy before starting
sandboxing.

Tested with a local patch to have the sandbox file broker client crash
if accessing the sysfs node for the CPU count, to verify that it's not
accessed.

Depends on D14524

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

--HG--
extra : moz-landing-system : lando
2019-02-25 16:20:50 +00:00
Karl Tomlinson
3218d3c266 Bug 1529399 replace AutoTaskGuard with equivalent AutoEnter r=padenot
Depends on D20605

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

--HG--
extra : moz-landing-system : lando
2019-02-25 10:49:01 +00:00
Karl Tomlinson
df3203f7f5 bug 1529399 remove now-unnecessary aDrainDirectTasks parameter from EventTargetWrapper::Runner constructor r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D20605

--HG--
extra : moz-landing-system : lando
2019-02-25 10:50:02 +00:00
Karl Tomlinson
a18b25dacc Bug 1529399 Remove unnecessary wrapper runnable from CreateDirectTaskDrainer() for stable state runnables r=padenot
The original DrainDirectTask() call was added for reasons described in https://bugzilla.mozilla.org/show_bug.cgi?id=1144486#c16 which should now be unnecessary since https://hg.mozilla.org/integration/autoland/rev/ed7c9d7a635d

The code being removed here was rework to use an appropriate AbstractThread:
https://hg.mozilla.org/mozilla-central/rev/02e5708a75fcdd9e8e4b065995f00b29896fb4b5#l9.32
https://bugzilla.mozilla.org/show_bug.cgi?id=1314833#c76

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

--HG--
extra : moz-landing-system : lando
2019-02-25 10:50:19 +00:00
Masatoshi Kimura
e25fbce870 Bug 1528651 - Re-enable warnings-as-errors on Windows in some directories. r=dmajor
--HG--
extra : source : ba86ea25070b37f4725834e1c2d9ec4c0783e119
2019-02-17 15:03:02 +09:00
Markus Stange
0b151b8c2b Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn
The actual subcategories will be added in later patches, so that there are no
unused categories.

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

--HG--
extra : moz-landing-system : lando
2019-02-16 17:37:43 +00:00
Sylvestre Ledru
41d1d79094 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-15 08:15:57 +00:00
Nika Layzell
dbec7d4975 Bug 1526382 - Part 2: Make nsIClassInfo use Array<nsIIDRef> for 'interfaces', r=mccr8
This is a follow-up to the previous part, which actually changes one of
these callers to use Array<nsIIDRef> instead of [array] nsIIDPtr.

From doing this patch, it seems like we should consider changing
the type `nsIIDRef` to instead simply be `nsIID`, and treat it more like
the `AString` types from the POV of XPIDL. `nsIIDPtr` would then
continue to exist for backwards compatibility, but we can probably
remove almost all current consumers over time.

Depends on D19175

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

--HG--
extra : moz-landing-system : lando
2019-02-13 21:42:08 +00:00
Myk Melez
4db9ccb1af Bug 1490496 - implement XPCOM FFI for key-value storage r=nika,lina,mossop
MozReview-Commit-ID: JnQzXG581DW

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

--HG--
rename : third_party/rust/crossbeam-utils/.cargo-checksum.json => third_party/rust/crossbeam-utils-0.3.2/.cargo-checksum.json
rename : third_party/rust/crossbeam-utils/CHANGELOG.md => third_party/rust/crossbeam-utils-0.3.2/CHANGELOG.md
rename : third_party/rust/crossbeam-utils/Cargo.toml => third_party/rust/crossbeam-utils-0.3.2/Cargo.toml
rename : third_party/rust/crossbeam-utils/LICENSE-MIT => third_party/rust/crossbeam-utils-0.3.2/LICENSE-MIT
rename : third_party/rust/crossbeam-utils/README.md => third_party/rust/crossbeam-utils-0.3.2/README.md
rename : third_party/rust/crossbeam-utils/src/cache_padded.rs => third_party/rust/crossbeam-utils-0.3.2/src/cache_padded.rs
rename : third_party/rust/crossbeam-utils/src/consume.rs => third_party/rust/crossbeam-utils-0.3.2/src/consume.rs
rename : third_party/rust/crossbeam-utils/src/lib.rs => third_party/rust/crossbeam-utils-0.3.2/src/lib.rs
rename : third_party/rust/crossbeam-utils/src/scoped.rs => third_party/rust/crossbeam-utils-0.3.2/src/scoped.rs
rename : third_party/rust/crossbeam-utils/src/consume.rs => third_party/rust/crossbeam-utils/src/atomic/consume.rs
rename : third_party/rust/crossbeam-utils/Cargo.toml => third_party/rust/threadbound/Cargo.toml
rename : third_party/rust/crossbeam-utils/LICENSE-MIT => third_party/rust/threadbound/LICENSE-MIT
rename : third_party/rust/uuid/.cargo-checksum.json => third_party/rust/uuid-0.6.5/.cargo-checksum.json
rename : third_party/rust/uuid/CODE_OF_CONDUCT.md => third_party/rust/uuid-0.6.5/CODE_OF_CONDUCT.md
rename : third_party/rust/uuid/Cargo.toml => third_party/rust/uuid-0.6.5/Cargo.toml
rename : third_party/rust/crossbeam-utils/LICENSE-MIT => third_party/rust/uuid-0.6.5/LICENSE-MIT
rename : third_party/rust/uuid/README.md => third_party/rust/uuid-0.6.5/README.md
rename : third_party/rust/uuid/benches/parse_str.rs => third_party/rust/uuid-0.6.5/benches/parse_str.rs
rename : third_party/rust/uuid/src/adapter.rs => third_party/rust/uuid-0.6.5/src/adapter.rs
rename : third_party/rust/uuid/src/core_support.rs => third_party/rust/uuid-0.6.5/src/core_support.rs
rename : third_party/rust/uuid/src/lib.rs => third_party/rust/uuid-0.6.5/src/lib.rs
rename : third_party/rust/uuid/src/prelude.rs => third_party/rust/uuid-0.6.5/src/prelude.rs
rename : third_party/rust/uuid/src/serde_support.rs => third_party/rust/uuid-0.6.5/src/serde_support.rs
rename : third_party/rust/uuid/src/slog_support.rs => third_party/rust/uuid-0.6.5/src/slog_support.rs
rename : third_party/rust/uuid/src/std_support.rs => third_party/rust/uuid-0.6.5/src/std_support.rs
rename : third_party/rust/uuid/src/test_util.rs => third_party/rust/uuid-0.6.5/src/test_util.rs
rename : third_party/rust/uuid/src/u128_support.rs => third_party/rust/uuid-0.6.5/src/u128_support.rs
rename : third_party/rust/uuid/benches/parse_str.rs => third_party/rust/uuid/benches/invalid_parse_str.rs
rename : third_party/rust/uuid/src/std_support.rs => third_party/rust/uuid/src/parser/std_support.rs
extra : moz-landing-system : lando
2019-02-07 16:14:04 +00:00
Razvan Maries
f86459d5dc Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-02-05 18:59:13 +02:00
Nathan Froyd
0724cee7fb Bug 1525031 - part 4 - remove nsILabelableRunnable; r=mccr8
This class is now a no-op class, and we don't need it anymore.
2019-02-04 15:33:49 -05:00
Nathan Froyd
6bab6786bf Bug 1525031 - part 2 - remove nsILabelableRunnable::GetAffectedSchedulerGroups; r=mccr8
The previous patch removed the only caller of this method, so we can now
remove the method itself.
2019-02-04 15:33:49 -05:00
Nathan Froyd
c891ad6099 Bug 1525031 - part 1 - remove nsILabelableRunnable::IsReadyToRun; r=mccr8
Nobody calls this now that the cooperative scheduler has been removed.
2019-02-04 15:33:49 -05:00
Sylvestre Ledru
14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Eric Rahm
7ff051a68b Bug 1329794 - Remove verbose thread shutdown warning. r=Nika 2019-01-31 14:56:04 -08:00
Nathan Froyd
628d7fba21 Bug 1523949 - part 2 - switch BlockingResourceBase to MOZ_THREAD_LOCAL; r=erahm,emilio
This change results in somewhat nicer code and should be slightly more
performant.
2019-01-30 17:26:27 -05:00
Kris Maglione
d1d8cfe0f0 Bug 1478124: Part 8e - Update XPCOM module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15043

--HG--
extra : rebase_source : 67200c20fe6db1abaf58b9e5203dce0e665e1117
extra : source : 012fd0107204da802f04b7c133b33a5dd22123a4
2018-12-18 20:28:14 -08:00
arthur.iakab
c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione
cf4ef5fd24 Bug 1478124: Part 8e - Update XPCOM module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15043

--HG--
extra : rebase_source : 91ea45ed8699df8492a62268ffa672c360222b68
extra : absorb_source : f480bf52dfe4bf9c256d00db07b3f34b3ba932f1
extra : histedit_source : 65168d0307dbd1928155e8cce8a0d45ef077f0de
2018-12-18 20:28:14 -08:00
Eric Rahm
ecd912d718 Bug 1437996 - Remove verbose timer shutdown warning. r=froydnj 2019-01-26 14:27:27 -08:00
Randell Jesup
76bd9e73cc Bug 1522150: Add a DeferredTimers queue ahead of the normal Idle EventQueue r=froyd
* * *
Bug 1522150: Rename NS_IdleDispatch* functions since they take queue identifiers r=froyd
2019-01-26 12:18:05 -05:00
Randell Jesup
5193189385 Bug 1522150: Rename EventPriority to EventQueuePriority to avoid name conflict with MacOS r=froyd 2019-01-26 12:18:05 -05:00
Sylvestre Ledru
b61d90492b Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Depends on D17388

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

--HG--
extra : moz-landing-system : lando
2019-01-24 08:11:00 +00:00
Nathan Froyd
577b673167 Bug 1485216 - follow-up - really delete now-dead code; r=me 2019-01-23 12:14:50 -05:00
Nathan Froyd
a9fb00a2f6 Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8
Quantum DOM is no longer a priority, and the extra code it introduces to
several places block useful refactorings.
2019-01-22 20:16:56 -05:00
Sylvestre Ledru
755a1a7c2f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-21 14:49:22 +00:00
Cosmin Sabou
7ccc9d8b0b Merge mozilla-inbound to mozilla-central. a=merge 2019-01-19 11:57:49 +02:00
Andrew McCreight
9e451b1da0 Bug 1517611 - Cycle collect WebAuthnManager and U2F more. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17026

--HG--
extra : moz-landing-system : lando
2019-01-18 23:21:46 +00:00
Jeff Muizelaar
91c37e95f0 Bug 1520955. Add ref qualifier to DataMutex for more safety. r=froydnj
We lose some sugar but gain some safety. This seems like the right
trade. If people want sugar they should use Rust.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 16:48:22 +00:00
Jeff Muizelaar
326fbedf02 Bug 1520952. Fix DataMutex constructor to avoid a copy. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D16915

--HG--
extra : moz-landing-system : lando
2019-01-18 01:32:40 +00:00
Greg Tatum
7042c8f1c3 Bug 1520526 - Add categories to all profiler markers; r=mstange
This commit adds categories to all markers. This way the profiler's
marker categories and frame label categories agree. There are a few
duplicate category properties on some of the marker payloads, but
this could be cleaned up in a follow-up if needed.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 15:40:15 +00:00
Jeff Muizelaar
3cf4f88e68 Bug 1520559. Move DataMutex from EME to xpcom/threads. r=froydnj
This is a better place for it and is more appropriate given that it
already exports to mozilla/DataMutex.h. I'll fix the rvalue reference
problems in a follow up.

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

--HG--
rename : dom/media/eme/DataMutex.h => xpcom/threads/DataMutex.h
extra : moz-landing-system : lando
2019-01-17 15:09:18 +00:00
Sylvestre Ledru
47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Eric Rahm
68491ea9df Bug 1437991 - Reduce scope of GetMainThread warning. r=froydnj
--HG--
extra : rebase_source : ec4e505fdefef42572e05a98348bef75473c8df2
2019-01-04 15:41:52 -08:00
Olli Pettay
7a31419242 Bug 1518038 - Add nsIThread.hasPendingHighPriorityEvents, r=froydnj
--HG--
extra : rebase_source : 47de7758f551bfe873426c8f92e27ac84ad4d260
2019-01-10 19:07:34 +02:00
Nathan Froyd
84a074ecfc Bug 1062533 - part 5 - add {Mutex,Monitor}::TryLock methods; r=mccr8
This plumbs the code from PlatformMutex up to the xpcom level.
2019-01-09 11:09:24 -04:00
Nathan Froyd
fc065671fb Bug 1513615 - part 3 - do more work in nsTimerEvent's constructor; r=glandium
nsTimerEvent goes through a multi-step initialization for reasons that
are lost to time.  We are also seeing peculiar crashes in
`nsTimerEvent::SetTimer()` that are only explainable by `SetTimer`
finding a non-null pointer where there should have been a null pointer.
The compiler ought to have been able to optimize those bits away, but no
matter: we can do the job ourselves and make the code clearer.

Since we only call `SetTimer` once, we should just move its work into
nsTimerEvent's constructor.
2019-01-08 19:31:40 -05:00
Nathan Froyd
7cb315f948 Bug 1513615 - part 2 - move some code around in PostTimerEvent; r=glandium
Doing this code movement separately will ideally make the next part of
this work easier to review.  The idea is that we want to extract all the
necessary information from `timer` before we pass ownership of it into
the newly-allocated nsTimerEvent.
2019-01-08 19:31:40 -05:00
Nathan Froyd
b9a6220890 Bug 1513615 - part 1 - tweak nsTimerEvent allocation; r=glandium
Unlike many of our uses of `new`, nsTimerEvent has its own definition of
`operator new`, to ensure instances are allocated through
TimerEventAllocator.  And allocating with TimerEventAllocator can fail.
Later changes, however, want to assume that constructing an nsTimerEvent
can't fail, which is difficult to guarantee with the current structure.

To make that guarantee, we need to make explicit what calling `new`
does: there's an "allocate memory" step and a "construct the object"
step.  The first part can fail, and that's what we care about here.
Once we have a chunk of memory, we can construct the object as normal,
secure in the knowledge that calling (placement) `new` is now guaranteed
to succeed.
2019-01-08 19:31:40 -05:00
Gabriele Svelto
cb1e8ac83e Bug 1386760 - Add a crash annotation containing the last executable we launched r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12643

--HG--
extra : moz-landing-system : lando
2019-01-02 14:54:58 +00:00
Jean-Yves Avenard
cdec3ff52a Bug 1512456 - P9. Re-enable assertion. r=gerald
Depends on D14032

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

--HG--
extra : moz-landing-system : lando
2018-12-11 17:43:19 +00:00
Jean-Yves Avenard
38ed72f936 Bug 1512456 - P2. Make GenericPromise exclusive. r=gerald
We introduce GenericNonExclusivePromise	that can be used to explicitly state than non-exclusive use is needed

We temporarily disable the assertion ensuring a promise is used exclusively when needed to allow for things to settle.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 10:46:17 +00:00
Jean-Yves Avenard
44594dd77a Bug 1510265 - P1. Enforce template-parameter classes restrictions in MozPromise. r=gerald
And some required fixes to make things compile.

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

--HG--
extra : moz-landing-system : lando
2018-12-06 16:26:01 +00:00