Commit Graph

1555 Commits

Author SHA1 Message Date
Andrea Marchesini
3f760d8258 Bug 1415564 - TaskQueue::Dispatch should return an error if failed, r=smaug 2017-11-09 01:43:40 +01:00
Nicholas Nethercote
79aa95fa24 Bug 1414150 - Remove the "idle_queue.*" prefs. r=farre.
There's no good reason why these can't be code constants.

Especially given that, due to a bug, changes to the
"idle_queue.{min,long}_period" constants were not being passed onto the C++
code!

Here's why: those two prefs were specified as integers in all.js. But we used
AddFloatVarCache() to set up the reading of those prefs. libpref fakes floats
by storing them as strings and then converting them to floats when they are
read.

Which means that AddFloatVarCache() used to fail to get the value from all.js
-- because there's a type mismatch, int vs. string -- and instead use the
fallback default. That value is the same as the one in all.js, which is lucky.
But if someone changed the value in about:config to 100 (an integer), a similar
failure would have occured and the value used by the C++ code wouldn't be
updated!

Also note that idle_queue.max_timer_thread_bound did not have a value in
all.js.

What a mess!

--HG--
extra : rebase_source : 86f8fa905163803eb95007609c029e18c2c4f586
2017-11-08 07:54:16 +11:00
Phil Ringnalda
e0e1cf4354 Backed out 4 changesets (bug 1406327) for crashing other tests, crashing itself, and assertion failures
Backed out changeset 471c710b19b1 (bug 1406327)
Backed out changeset 5890bb3a0d97 (bug 1406327)
Backed out changeset 63c8ee57e38c (bug 1406327)
Backed out changeset 345972733daa (bug 1406327)

MozReview-Commit-ID: IwWx11QSuS4
2017-11-01 21:44:12 -07:00
Daosheng Mu
f10ab3c49f Bug 1406327 - Part 4: RefreshVRDisplays needs to be at VRListenerThread; r=kip
MozReview-Commit-ID: KuhPFqMhTDB

--HG--
extra : rebase_source : 53dac47c5ede72acbe2760f056ca88f8cbc0c6b9
2017-11-01 22:15:06 +08:00
Adam Gashlin
3da1701e2d Bug 1401400 - Part 3. Process all threads when crashing for hang. r=gsvelto
MozReview-Commit-ID: JH4PGYJreF7
2017-10-19 14:49:13 -07:00
Phil Ringnalda
ac48293bbe Backed out 5 changesets (bug 1401400) for eslint failure
Backed out changeset 788f5831a14d (bug 1401400)
Backed out changeset 3ccd39a02c21 (bug 1401400)
Backed out changeset e5860d5128fb (bug 1401400)
Backed out changeset fa28abe68df1 (bug 1401400)
Backed out changeset 0290bb0af376 (bug 1401400)

MozReview-Commit-ID: 8e9kQEaE7Bs
2017-10-26 19:29:38 -07:00
Adam Gashlin
be677dbba0 Bug 1401400 - Part 3: Process all threads when crashing for hang. r=gsvelto 2017-10-19 14:49:13 -07:00
Andrew McCreight
989d6728ca Bug 1412119 - Re-fix mode lines in xpcom. r=erahm 2017-10-26 14:39:00 -04:00
Kris Maglione
b46bd8b6b0 Bug 1411817: Add do_AddRef overloads for nsCOMPtr<T> and nsRevocableEventPtr<T>. r=froydnj
MozReview-Commit-ID: gEU7whtNHc

--HG--
extra : rebase_source : 6763e6b31be8a3341f968eef057b756fbfe3cbbe
extra : amend_source : da6140fb0559d78b46e80e72e8b6768bf2364fb1
2017-10-25 19:46:50 -07:00
Nathan Froyd
a7b1f6e01e Bug 1410575 - avoid hash table re-lookups in LabeledEventQueue::GetEvent; r=erahm
We can save the entry in the hashtable, and then re-use that entry as a
starting point for removing from the hashtable, should that become
necessary.  This saves us having to rehash things, at a minimum.
2017-10-26 13:45:29 -04:00
Sebastian Hengst
31bf3a1a42 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4Lk5P5UYmTe
2017-10-24 11:52:35 +02:00
Nathan Froyd
322e865fb8 Bug 1402044 - don't inline InputEventStatistics::Get(); r=erahm
Defining Get() in the declaration of InputEventStatistics implicitly
sticks an "inline" on the function, which is not what we want: inlining
it spreads around a lot of static initialization code.  Providing an
out-of-line definition is much better in terms of code size.
2017-10-23 12:15:16 -04:00
Nathan Froyd
8a54fa305a Bug 1410232 - fix SchedulerGroupSet::Put when transitioning to multiple groups; r=billm
We were moving state from single -> multi, but we weren't doing anything
with the group that was passed in for such cases.
2017-10-23 08:49:41 -04:00
Sebastian Hengst
af53b8aad8 merge mozilla-central to autoland. r=merge a=merge 2017-10-23 23:52:54 +02:00
Philippe Normand
bf7e42184a Bug 1410023 - Non-unified build fixes for xpcom/threads. r=froydnj
The recent Timer implementation changes from Bug 1404198 broke non-unified builds.

--HG--
extra : rebase_source : c87acca6565dd282f79dec481f0abf5aea9066a1
2017-10-20 17:36:29 +01:00
Nathan Froyd
7c3d6e9065 Bug 1410088 - don't copy QueueEntry(ies) when calling LabeledEventQueue::GetEvent; r=erahm
We were extracting elements from the queue and unnecessarily refcounting
them, rather than transferring the owning reference out of the queue and
out to the caller.
2017-10-19 16:22:55 -04:00
Nathan Froyd
aeec9a0da6 Bug 1410086 - don't copy QueueEntry(ies) when checking LabeledEventQueue for ready events; r=erahm
There's no need to copy events in the queue to check whether they are
ready to run or not.
2017-10-19 16:22:55 -04:00
Nicholas Nethercote
78030c0e7b Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj.
This lets us replace moz_xstrdup() of string literals with AssignLiteral(),
among other improvements.

--HG--
extra : rebase_source : 9994d8ccb4f196cf63564b0dac2ae6c4370defb4
2017-10-18 13:17:26 +11:00
Sebastian Hengst
32f7c8fec3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02:00
Kris Maglione
f6ba082a01 Bug 1404198: Part 2b - Switch to NS_NewTimer* in xpcom. r=njn
MozReview-Commit-ID: BEtHEpOmT1E

--HG--
extra : rebase_source : dac8a182f1ad76df6715146e1da1279c02c0406f
2017-10-15 23:11:22 -07:00
Kris Maglione
3c7ea8250b Bug 1404198: Part 2a - Add non-virtual constructors for nsITimer. r=njn
MozReview-Commit-ID: 3I7MAquvMHj

--HG--
extra : rebase_source : 9fb92a49fb9b89aec738aca5f77ef3a612802df6
2017-10-15 23:10:17 -07:00
Daosheng Mu
e41dc03f86 Bug 1392216 - Part 1: Create VR listener thread in GPU process; r=dvander,kip
MozReview-Commit-ID: Img0HT9ax90

--HG--
extra : rebase_source : ef3e2dac31f498454121639aa46657c0cd16f949
2017-10-05 18:12:45 +08:00
Jed Davis
b39b9e95d4 Bug 1406971 - Change nsProcess to use LaunchApp from IPC, instead of NSPR, on Unix. r=froydnj
This also fixes the Unix part of bug 678369, and fixes bug 147659 as a
convenient side-effect of using LaunchApp (which has the desired
fd-closing behavior already) rather than directly using fork/exec.

The main goal is to work around bug 227246, where PR_CreateProcess on
Unix interferes with anything else that tries to use child processes.
This does not fix that bug -- NSPR will still cause problems if used in
that way -- but it's an adequate workaround for that bug in Gecko in
almost all cases (the one known exception is nsAuthSambaNTLM, which uses
NSPR directly and needs to be fixed separately).

Waiting for the child process uses waitpid() directly, sharing the
existing code used for OS X.

MozReview-Commit-ID: 6zfZ1Zgk2i9

--HG--
extra : rebase_source : e8230503d82943af4563d8d63baa029d8a698683
2017-10-06 19:58:33 -06:00
Sebastian Hengst
8ff69604ce merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-10-12 12:40:23 +03:00
Chris Pearce
5ef6d52547 Bug 1407248 - Include StaticPtr.h in SystemGroup.cpp. r=billm
We were using a StaticRefPtr without it being fully defined for
SystemGroupImpl::sSingleton, resulting in a non-unified build failure.

MozReview-Commit-ID: AgSuVvGTri7

--HG--
extra : rebase_source : 906e30e8c2c21e13a045a941e9d92e1d2d2af079
2017-10-10 16:34:27 +02:00
Bill McCloskey
7ccc0ef499 Bug 1404629 - Make Queue emptiness assertion DEBUG-only (r=froydnj)
MozReview-Commit-ID: HIAJKbdiBCf
2017-10-11 14:05:32 -07:00
James Cheng
8cd834cd62 Bug 1365894 - Make SystemGroupImpl be a normal ref-counted object. r=ehsan
MozReview-Commit-ID: LUcoBhNx2M5

--HG--
extra : rebase_source : 10010b8cc206c16980c9e1601445f262104f1dd2
2017-10-09 13:40:12 -04:00
Nicholas Nethercote
8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Luke Wagner
c577a512d7 Bug 1347644 - Make NS_ProxyRelease runnables cancelable (r=bkelly)
MozReview-Commit-ID: 238uix57pl6
2017-10-06 10:55:24 -05:00
Cervantes Yu
0469f7535b Bug 1400294 - Add 'noShell' attribute to nsIProcess to use CreateProcess() for launching a process that doesn't require shell service on Windows. r=froydnj,r=aklotz,r=dmajor
This adds an attribute 'noShell' to nsIProcess that is used to launch a process
using CreateProcess() if we are sure we are launching an executable and don't
require the extra work of the Windows shell service.

MozReview-Commit-ID: 7p0iHCZK1uX
2017-10-03 11:29:14 +08:00
Wes Kocher
0196bb1eed Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9KMX1mdjylD
2017-09-29 14:48:25 -07:00
Wes Kocher
eb9a2ed0f2 Merge inbound to central, a=merge
MozReview-Commit-ID: IqwKWn7ceHC
2017-09-29 14:47:25 -07:00
Cosm
b4871889d9 Bug 1385335 - Use RecursiveMutex in AsyncPanZoomController.r=botond
MozReview-Commit-ID: ETzQVCu1o7z

--HG--
extra : rebase_source : c7126c098f63e8ce12506dfaee0d995091512b06
2017-09-27 08:41:51 +05:30
David Major
d381d825e6 Bug 1376638 followup: update comment to reflect code changes. DONTBUILD 2017-09-29 12:25:10 -04:00
Philippe Normand
cf92431595 Bug 1404305 - Include nsCOMArray.h and SystemGroup in nsThreadPool.cpp to fix the build in non-unified mode. r=froydnj
MozReview-Commit-ID: 1bZHw4TS9L1

--HG--
extra : rebase_source : 8ee48871ab0ae82c70ce7eb3bd64e0497891fc97
2017-09-28 14:32:26 +01:00
Wes Kocher
22a72df7fe Merge inbound to m-c a=merge
MozReview-Commit-ID: 6viJ4wRxLa8
2017-09-26 15:54:51 -07:00
Bevis Tseng
da72a5478c Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm
--HG--
extra : rebase_source : ffccc53b6b1055d7cfeb281ee145b897807a7810
2017-09-13 11:59:35 +08:00
Sebastian Hengst
7eec7a0a11 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: mr7OYuaLKE
2017-09-21 15:23:43 +02:00
Nathan Froyd
3393422869 Bug 1401662 - don't inline nsThreadManager::get(); r=erahm
Defining get() in the declaration of nsThreadManager implicitly sticks
an "inline" on the function, which is not what we want: inlining it
spreads around a lot of static initialization code.  Providing an
out-of-line definition is much better in terms of code size.
2017-09-20 17:10:20 -04:00
Byron Campen [:bwc]
6b3da0609f Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings
MozReview-Commit-ID: JjYScKwyika

--HG--
extra : rebase_source : a5a8a17f86459ace51d9250454bd4cf1433130b0
2017-09-14 12:19:24 -05:00
Philippe Normand
fb80b50e2e Bug 1399825 - Include nsXULAppAPI.h in nsThreadManager.cpp. r=Ms2ger
This ensures XRE_IsContentProcess() is defined, as it's used in this file.

MozReview-Commit-ID: GwBYcFBiUBK
2017-09-14 12:51:41 +01:00
James Cheng
0c675a3236 Bug 1393710 - Add thread name into NS_DebugBreak for better debugging. r=froydnj
MozReview-Commit-ID: AvqajMgtpuh

--HG--
extra : rebase_source : 13e99f103abc9e39ec4cff15f720cd09a9e6b2c5
2017-08-30 11:13:50 +08:00
Wes Kocher
1ea82f66aa Merge m-c to autoland, a=merge
MozReview-Commit-ID: AHxJvcR2Tpa
2017-09-20 17:47:16 -07:00
Blake Kaplan
04b86e2150 Bug 1398393 - Set Servo thread state on cooperative threads. r=billm
By doing this we avoid triggering assertions in the Servo code that ensure
we have registered the thread with Servo and set the proper state on it.

MozReview-Commit-ID: K6qHrYoQDLm

--HG--
extra : rebase_source : d01b0aad42273f6b92b7cfd5f5fe17ffe7b4cda0
2017-09-08 16:50:34 -07:00
Blake Kaplan
c1ce54a82a Bug 1401412 - Destroy this singleton during XPCOM shutdown. r=smaug
Unfortunately, this needed some additional trickery in order to keep its
constructor "private". I stole this trick from [1]. With this patch, we tear
down the statistics object during XPCOM shutdown intead of after it. I don't
believe that we need the object to live past the ClearOnShutdown destructors.

[1] http://rienajouter.blogspot.com/2014/10/makeshared-and-makeunique-for-classes.html

MozReview-Commit-ID: JsiN6Bq9Yp4

--HG--
extra : rebase_source : dd26c8e6906a6c9fd500c28379f8c63fd7c3ad6a
2017-09-19 17:38:05 -07:00
Bill McCloskey
0f4e7d4fe6 Bug 1398423 - Fix LabeledEventQueue bug with unlabeled events (r=froydnj)
MozReview-Commit-ID: 7ru62QTkya2
2017-09-11 19:11:03 -07:00
Bill McCloskey
b9683a5b18 Bug 1398423 - Make linked list of SchedulerGroups static (r=froydnj)
MozReview-Commit-ID: GgfdRlhPiHP
2017-09-11 19:11:01 -07:00
Bill McCloskey
9c4cbe52d1 Bug 1398417 - Fix PrioritizedEventQueue bugs with input event prioritization (r=stone)
MozReview-Commit-ID: 4wk8EUv0h7C
2017-09-11 19:10:57 -07:00
James Cheng
fb6af85bd2 Bug 1397344 - Use Decay to ensure StoreCopyPassByXXX stores the value by copy not by reference. r=gerald
MozReview-Commit-ID: Ec9yjYdQ1jC

--HG--
extra : rebase_source : 6b2f63bf7af9a3c8a879ac6f3865abf6be9a4155
2017-09-07 17:02:13 +08:00
Bill McCloskey
9cbaae8cfc Bug 1396155 - Allow LabeledEventQueue to be used outside the Scheduler (r=froydnj)
MozReview-Commit-ID: 4yEX39HXh9W
2017-09-07 22:31:34 -07:00