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

1279 Коммитов

Автор SHA1 Сообщение Дата
Carsten "Tomcat" Book e12cc94275 merge mozilla-inbound to mozilla-central a=merge 2017-01-23 11:15:58 +01:00
Gerald Squelart eb46a3cefe Bug 1332785 - Optimize MozPromiseHolder::Resolve and Reject - r=jwwang
Instead of lvalues, MozPromiseHolder::Resolve and Reject now take either
const& or && values of the expected types, to allow move semantics all the way
to the ResolveOrRejectValue object.

Note that we won't just take forwarding references of any type, as this could
lead to implicit conversions by bypassing the 'explicit' marker of the value
type constructors, like in bug 1331137.

MozReview-Commit-ID: K0jeY6WTXI1

--HG--
extra : rebase_source : 7ee0fd1edfdeadb239f48c8b5b46fd54af3ec5d2
2017-01-21 12:24:10 +11:00
JW Wang d7ec453920 Bug 1333280 - Make ThenValueBase::mCompletionPromise a MozPromise::Private. r=gerald
MozReview-Commit-ID: E046bQoQN1

--HG--
extra : rebase_source : e8563000ac0ab452d703dd6e67878e8605f7acc9
extra : intermediate-source : 514e9122a222fba252f47673fbe3cf842c322790
extra : source : 7f2bf86df00cc33737da5a2aaa8052cc60c5d8cf
2017-01-23 17:47:27 +08:00
Gerald Squelart 25992688b7 Bug 1332825 - Use move semantics in MozPromise::All() and AllPromiseHolder - r=jwwang
MozPromise::All sets up 'Then' lambdas on all sub-promises, each one taking the
resolve/reject object by value.
Since this value will not be used again in the lambda, it is safe to Move it,
and from there MozPromiseHolder::Resolve/Reject can also Move it again into the
holder storage, potentially saving two copies per Resolve/Reject.
Also, once all sub-promises have been resolved, the resolve-values can be
Move'd into the joining promise's Resolve function.

MozReview-Commit-ID: 5oxgNEnE5lq

--HG--
extra : rebase_source : f0542055beb1434e7db384722c5123d888ca00e7
2017-01-21 17:33:49 +11:00
Gerald Squelart 5c95a7141e Bug 1332779 - InvokeAsync's MethodCall constructor should take forwarding refs instead of lvalues - r=jwwang
The aArgs parameter pack was already Forward'ed inside the constructor, so
maybe the '&&' was forgotten?

MozReview-Commit-ID: 7yg07axhZnp

--HG--
extra : rebase_source : dccd3ea5f0f1b6cadfe6bbc86c8ad34cb7f2c99e
2017-01-21 12:04:54 +11:00
Nicholas Nethercote 12647a7223 Bug 1332577 (part 7) - Rename mozilla_get_pseudo_stack() as profiler_get_pseudo_stack(). r=mstange.
This makes it consistent with other profiler functions.

--HG--
extra : rebase_source : 1e52acdc448691b8859bb147a0c70b198b432fe2
2017-01-20 15:07:05 +11:00
Nathan Froyd 28f29930ef Bug 1324894 - use standard Monitor APIs rather than PR_Interrupt in BackgroundHangMonitor; r=darchons
Using PR_Interrupt here makes life difficult for other things, such as
moving away from NSPR synchronization primitives.
2017-01-20 16:38:12 -05:00
Bevis Tseng 849cf42acf Bug 1314833 - Part 1.1: Refator XPCOMThreadWrapper as EventTargetWrapper to allow EventTargets to be AbstractThreads. r=jwwang
MozReview-Commit-ID: FYjbKxcIc5o

--HG--
extra : rebase_source : 37d55a393552bf4cf5de1ad25c2039fde8517f3a
2016-11-29 13:01:18 +08:00
JW Wang 84387b56fe Bug 1328130. Part 3 - remove unused functions and fix comments. r=gerald
MozReview-Commit-ID: JURmHasmhOU

--HG--
extra : rebase_source : f2113e74e5abb0d57b2c70eb7b47b5d6c2829a3d
extra : intermediate-source : 88255f6011134a455b3bee888ebee256209f8e56
extra : source : 5371fe5d527981419953fae96d5cc80d6d15b413
2017-01-11 23:52:24 +08:00
JW Wang 4f5754ca55 Bug 1328130. Part 2 - remove MozPromiseRequestHolder::Begin(). r=gerald
MozReview-Commit-ID: JL27n0Era6E

--HG--
extra : rebase_source : e6de76db3fb35b110370497f4060ea1c3f527f23
extra : intermediate-source : 5bc39a45ef042b895a5abda59cc0796e8cfb4be3
extra : source : a7f7faded7b112e8a971ca96b091a9a22214a2bb
2017-01-11 16:33:29 +08:00
JW Wang bc040ae51e Bug 1328130. Part 1 - add ->Track(). r=gerald
MozReview-Commit-ID: FW7Urv6nyOS

--HG--
extra : rebase_source : 256576fa8b1e5bb6587e280512619f5d7e74a0cc
extra : intermediate-source : 82d0eea2d53edd8d538bc2d0fd0116046fb489b7
extra : source : 9f4301a98b836ec5fc4ca9e49e6a32f0232b71e5
2017-01-11 15:38:37 +08:00
Nicholas Nethercote 949658eb73 Bug 1329857 - Remove NS_METHOD and NS_CALLBACK. r=froydnj.
Bug 1295053 removed most uses of NS_METHOD and NS_CALLBACK, but one use was
unintentionally left behind (in the XPIDL parser) and another has since crept
in (in MediaDrmCDMProxy.h).

So this patch removes NS_METHOD and NS_CALLBACK. NS_METHOD_(nsresult) and
NS_CALLBACK_(nsresult, T) can still be used for the same purpose, but those
alternatives are less likely to be used unintentionally.

--HG--
extra : rebase_source : a50fc7b2a64a36d1ca9beda81bc0edb8f2ec1934
2017-01-10 14:08:43 +11:00
Gerald Squelart 5d4cad020a Bug 1320785 - Remove obsolete 'ns' from 'StorensRefPtrPassByPtr' - r=froydnj
MozReview-Commit-ID: FuhlsLVFdLi

--HG--
extra : rebase_source : c1bb8330c4ca0dbf15a68a4dbd0dfeff615163be
2017-01-09 07:55:19 +11:00
Gerald Squelart d551220947 Bug 1322964 - MozPromise.Then() taking only one resolve+reject method - r=jwwang
Then and ThenPromise can now be given only one member function, which takes a
`const MozPromise::ResolveOrRejectValue&`.

MozReview-Commit-ID: 5Zm0i27GHcA

--HG--
extra : rebase_source : 1ed068681616fa0aa5fa77f8dbf78ccbd727f363
2016-12-08 23:09:07 -10:00
Gerald Squelart b3e89a3af9 Bug 1322964 - MozPromise.Then() taking only one resolve+reject function - r=jwwang
Then and ThenPromise can now be given only one function object, which takes a
`const MozPromise::ResolveOrRejectValue&`.

MozReview-Commit-ID: BEtc3spK9Yh

--HG--
extra : rebase_source : 1b16ad15ebfcdfb653d8d98073adee0f8b27b46e
2017-01-03 16:15:14 +11:00
Gerald Squelart 9a05a0446d Bug 1322964 - MozPromise clean-up - r=jwwang
Removed 'virtual' from overrides, as per coding guidelines.
Fixed some incorrect indentations, and inconsistencies.

MozReview-Commit-ID: 4kNVgoDljG3

--HG--
extra : rebase_source : 7b25abacc7cfc1a6898963bc58120204c70bee45
2016-12-08 10:48:48 -10:00
Markus Stange 4bdc4ca0fb Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS,
and except for the Shutdown Watchdog thread in nsTerminator.cpp and the
CacheIO thread. The Shutdown Watchdog thread stays alive past leak detection
during shutdown (by design), so we'd report leaks if we profiled it. The
CacheIO thread seems to stay alive past shutdown leak detection sometimes as
well.

This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.

MozReview-Commit-ID: 3vwhS55Yzt

--HG--
extra : rebase_source : 56dd27282e7bd09a7e7dc7ca09ccfe3a0198e7af
2017-01-05 16:34:26 +01:00
Markus Stange f603a27cd8 Bug 1323100 - Stop double-registering the LazyIdleThread with the profiler. r=froydnj
MozReview-Commit-ID: 2vdcgCcdOYJ

--HG--
extra : rebase_source : fd8b7c4a3052b261317d832ec03ee1c93be723b9
2016-12-21 23:07:26 +01:00
Markus Stange e442f76c87 Bug 1323100 - Register named threads with the profiler. r=froydnj
MozReview-Commit-ID: FbE4BTcnfEh

--HG--
extra : rebase_source : 98ae8f4c48c396e35a77c81599b7b38790dea10b
2016-12-14 19:50:11 -05:00
Markus Stange 8924022f9d Bug 1323100 - Add nsThreadManager::NewNamedThread API. r=froydnj
The point of this exercise is to make the thread name available in the thread
func of the thread, so that we can register the thread with the profiler from
the very start of its lifetime, and so that registration and unregistration
can be inside the same function.

MozReview-Commit-ID: DiiMKUQVr55

--HG--
extra : rebase_source : 24b15d56315ad49e72b3e9b76db7fb634f3bfe01
2016-12-20 15:10:20 +01:00
Markus Stange 7fd52a7829 Bug 1323100 - Use nsThreadPoolNaming::GetNextThreadName and NS_NewNamedThread in nsThreadPool. r=froydnj
MozReview-Commit-ID: 6IB5yvJtAQm

--HG--
extra : rebase_source : 3e3f22ed091dc881bed294bc64c611400021aaa8
2016-12-22 00:14:30 +01:00
Markus Stange 692210bd80 Bug 1323100 - Assign names to all remaining threads that are created through NS_NewThread and create them using NS_NewNamedThread instead. r=froydnj
MozReview-Commit-ID: 7W1dt2BBKJZ

--HG--
extra : rebase_source : c7e335dac2e0f02782f0eb229a7181c8d01317a2
2016-12-21 11:43:50 +01:00
Bill McCloskey 8a53959bbe Bug 1320753 - Make TabGroup event target be a ThrottledEventQueue for timers, workers (r=bkelly)
MozReview-Commit-ID: FCfYz02r8yI
2016-12-23 11:48:13 -08:00
Wes Kocher b427632e5a Merge m-c to inbound, a=merge 2016-12-19 16:48:34 -08:00
JW Wang 6567965ad9 Bug 1324335. Part 1 - give MozPromiseHolder a move constructor. r=gerald
MozReview-Commit-ID: BBY4u0JSJTM

--HG--
extra : rebase_source : db81fc96d024304d3eef7f7b5ba503e0753662f2
extra : source : 4a22337cb08711fe4b0fe44d58a8d520c11c975f
2016-12-17 11:12:00 +08:00
Jeff Walden be049bba4a Bug 1315560 - Make nsThreadSyncDispatch::IsPending properly respect the C++ memory model with respect to threads. r=froydnj
--HG--
extra : rebase_source : 309596fd407a13900fdf51f7e6f1972b8613026e
2016-11-07 15:24:11 -08:00
JW Wang b4d0509caa Bug 1321744. Part 4 - fix comments. r=gerald
MozReview-Commit-ID: HPIDi9tUHD3

--HG--
extra : rebase_source : c22cb4da5f3916559f3776409fdbefaf5328ac0b
2016-12-14 10:59:41 +08:00
JW Wang d4d5d4d5bb Bug 1321744. Part 3 - remove ThenPromise and replace its use with Then. r=gerald
MozReview-Commit-ID: AsmePdCp2tC

--HG--
extra : rebase_source : e08ac48584375d2bc12f5b73a1e60f2800359ed9
extra : intermediate-source : 94e727f7cd11bb04812da3662a0ee1fd461cc832
extra : source : 5307716231f93b01c0357011f8849015d4d97d0a
2016-12-04 08:51:25 +08:00
JW Wang fbfcb37762 Bug 1321744. Part 2 - add the ability of promise chaining to Then(). r=gerald
MozReview-Commit-ID: IaDgoWcmFRO

--HG--
extra : rebase_source : 420834ba105e2606e10f2dfef480a3586a5f8fb3
extra : intermediate-source : 1c2f25bdf9e1dcac085df830e6de7193d66dbe10
extra : source : 4bb6d68fb29d3b0c5eb3a66705b69892b1c94ad4
2016-12-13 17:07:03 +08:00
JW Wang dea1beb2c4 Bug 1321744. Part 1 - re-implement MozPromise::Then() using the command pattern. r=gerald
MozReview-Commit-ID: 2FkjtBKjIAc

--HG--
extra : rebase_source : 9cda835345135b483640226f7a4afdbc26459a82
extra : intermediate-source : 74f5fc402b87c073d581c1a6f6798c7522809dbf
extra : source : 7e7aa2e92f1f1deb901a8e04b68de999340a772d
2016-12-02 15:41:19 +08:00
Carsten "Tomcat" Book eb5f79ce29 Merge mozilla-central to autoland 2016-12-13 16:53:28 +01:00
JW Wang 52ec68d60c Bug 1323155 - fix data race in mCompletionPromise. r=gerald
MozReview-Commit-ID: J2TVNWvx9pb

--HG--
extra : rebase_source : 64b4f60500eafd24660141103a22693ce37dfd2b
2016-12-13 16:55:14 +08:00
Andrew McCreight fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd 826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Tomislav Jurin 348bfffc19 Bug 1296189 - Replace NS_RUNTIMEABORT("some string literal message") with MOZ_CRASH(). r=froydnj 2016-12-02 13:46:53 -08:00
JW Wang 0bd4f42b74 Bug 1321471. Part 2 - remove CompletionPromise() to enforce use of ThenPromise(). r=jwwang
MozReview-Commit-ID: 9zC3JnzumES

--HG--
extra : rebase_source : c4d41c3128c6521fdbb7ac8386446b2b846f21f0
2016-12-02 10:40:01 +08:00
Ryan VanderMeulen 9bd4ab78e6 Merge m-c to inbound. a=merge 2016-12-01 09:33:46 -05:00
JW Wang b49cd98e3b Bug 1321250 - Add MozPromise::ThenPromise() for easier promise chaining. r=jya
MozReview-Commit-ID: 7J60CN0HbOW

--HG--
extra : rebase_source : d5fae5853c2c6c3197361db9c62424b6cbe9f593
extra : source : 8ab119efc0d23e9d919846489a0bdc9473d2fbd6
2016-11-30 18:23:12 +08:00
Bill McCloskey 6df682a091 Bug 1320753 - Adding nsINamed naming to nsITimer (r=ehsan)
MozReview-Commit-ID: AbyLcMhRvbx
2016-11-30 18:01:59 -08:00
Bill McCloskey 972fbd3fdf Bug 1320753 - Add nsINamed and have Runnable implement it (r=ehsan)
MozReview-Commit-ID: 6Vuw3aJ3860
2016-11-30 18:01:59 -08:00
Gerald Squelart 43d8fb333c Bug 1313497 - InvokeAsync taking a lambda - r=froydnj
This new InvokeAsync overload takes a single lambda (or any function object).
This is most useful when a method call is not strictly necessary.

Avoid obvious copies by refusing lvalue-references.
(If one day this is really needed, the implementation is already there, hidden
inside `namespace detail`).

MozReview-Commit-ID: 57gPBz9kO1q

--HG--
extra : rebase_source : c9330ca2b6d06dac0318f38a68dadbbccc112325
2016-11-13 11:13:07 +11:00
Gerald Squelart e4d1e66e1a Bug 1313497 - Storages can be provided to InvokeAsync - r=froydnj
InvokeAsync' Storages work like NewRunnableMethod, where template
parameters must be given, to specify the storage of arguments that are passed
to the target method.
This is especially useful when target methods take references (or pointers),
and there is a choice between passing the reference as-is because the object is
long-lived, or by taking a copy otherwise.

If no Storages are provided, InvokeAsync will store (non-reference/pointer)
objects and move them into the target method parameters.

MozReview-Commit-ID: 9qTQf84bOMv

--HG--
extra : rebase_source : c73e803f9024fbaf0ff8b2e615013a42f4f3c914
2016-11-11 15:10:46 +11:00
Andreas Farre 5ae81e4455 Bug 1313989 - Remove MutexAutoUnlock in nsThread::GetIdleEvent. r=froydnj,mattwoodrow
Rewrite VsyncRefreshDriverTimer::GetTimerRate to always use the cached
value of the vsync rate in VsyncChild to avoid processing events on
the main thread.

Since VsyncChild::GetTimerRate is called in VsyncRefreshDriverTimer's
constructor, that cached value is bound to be set soon. This should
make the period of time we need to guess in
VsyncRefreshDriverTimer::GetTimerRate very short.

MozReview-Commit-ID: 1bnHNXAP8jY

--HG--
extra : rebase_source : 5a731962d417c4b3352970b2adb92b5d31de021c
2016-11-10 10:01:51 +01:00
JW Wang edcebe85dc Bug 1225731 - Early bailout from TaskQueue::DispatchLocked(). r=froydnj
MozReview-Commit-ID: Xhj87WeRID

--HG--
extra : rebase_source : 0de51688f506a1e302129e69a6353a9d48e6bfed
2016-11-10 15:45:45 +08:00
JW Wang fa5d7da911 Bug 1316529. Part 2 - remove TaskQueue::DispatchMode. r=froydnj
MozReview-Commit-ID: 5F2OHCpxx7K

--HG--
extra : rebase_source : 215c489a6da017692c491e8ae1e8be8fb2d7a64d
2016-11-10 15:34:35 +08:00
JW Wang f94c8356e3 Bug 1316529. Part 1 - Remove TaskQueue::mIsFlushing. r=froydnj
MozReview-Commit-ID: 3x4OO7B2htB

--HG--
extra : rebase_source : daf50feae64f625370145b59a0377c7671645f19
2016-11-10 15:28:48 +08:00
Olli Pettay cb803253a5 bug 1306591, add secondary event queue to let high priority messages to be processed sooner, r=billm
--HG--
extra : rebase_source : 2ce6e06783e399e787d0445943f9f39bcef1cc22
2016-11-08 14:05:45 +02:00
Ben Kelly 2ee0844d95 Bug 1300659 P1 Add the ThrottledEventQueue class. r=froydnj 2016-11-07 12:30:17 -08:00
Phil Ringnalda 06521a66a4 Merge m-c to m-i
MozReview-Commit-ID: 7W5SwSOspcB
2016-11-04 21:04:44 -07:00
Andreas Farre 8f6319bbcd Bug 1315187 - Assert that thread calling IdleDispatch is the thread that will run it. r=smaug
MozReview-Commit-ID: LGrKeIUaGCD

--HG--
extra : rebase_source : 210092f7e0d533bcd2f2748a52460152dc462b61
2016-11-04 09:08:31 +01:00
Andreas Farre 261494e785 Bug 1314314 - Restrict when idle callbacks are fired. r=bkelly
MozReview-Commit-ID: L9ZTVFeHGTw

--HG--
extra : rebase_source : 7178cd47eba6b95539bf9e7f44df8e596de13ebf
2016-11-03 18:47:23 +01:00
Eric Rahm 63cd7f256f Bug 1313469 - Part 2: Convert TestCOMArray to a gtest. r=froydnj
MozReview-Commit-ID: CEhXX60lpZ8

--HG--
rename : xpcom/tests/TestCOMArray.cpp => xpcom/tests/gtest/TestCOMArray.cpp
2016-11-04 16:21:59 -07:00
Phil Ringnalda c0dcc76ef6 Backed out 18 changesets (bug 1313469, bug 1313468, bug 1313474, bug 1313472, bug 1313473, bug 1313470, bug 1313471, bug 1313467, bug 1313466) for OS X gtest crashes
CLOSED TREE

Backed out changeset 5b5686e1bcd1 (bug 1313474)
Backed out changeset e8d20bdd13d4 (bug 1313473)
Backed out changeset 643bdd25166e (bug 1313473)
Backed out changeset 9a33c84ab30a (bug 1313472)
Backed out changeset 4d84926813e9 (bug 1313472)
Backed out changeset c85e7a7a5a99 (bug 1313471)
Backed out changeset 5d82bc9436ab (bug 1313471)
Backed out changeset 00f7b342bb29 (bug 1313470)
Backed out changeset f012923cfd8b (bug 1313470)
Backed out changeset e7d5b8135ae6 (bug 1313470)
Backed out changeset 82bf00ff6505 (bug 1313469)
Backed out changeset 5364fc8db9b0 (bug 1313469)
Backed out changeset 02959aa60196 (bug 1313468)
Backed out changeset 3c25a6ed5914 (bug 1313467)
Backed out changeset 0acc0a131101 (bug 1313467)
Backed out changeset 6fae1bbd3819 (bug 1313467)
Backed out changeset 107eb264a40d (bug 1313467)
Backed out changeset 9b60e295a885 (bug 1313466)

MozReview-Commit-ID: IKsAZxBYMfv

--HG--
rename : xpcom/tests/gtest/TestAutoPtr.cpp => xpcom/tests/TestAutoPtr.cpp
rename : xpcom/tests/gtest/TestAutoRef.cpp => xpcom/tests/TestAutoRef.cpp
rename : xpcom/tests/gtest/TestCOMArray.cpp => xpcom/tests/TestCOMArray.cpp
rename : xpcom/tests/gtest/TestCOMPtr.cpp => xpcom/tests/TestCOMPtr.cpp
rename : xpcom/tests/gtest/TestCOMPtrEq.cpp => xpcom/tests/TestCOMPtrEq.cpp
rename : xpcom/tests/gtest/TestFile.cpp => xpcom/tests/TestFile.cpp
rename : xpcom/tests/gtest/TestHashtables.cpp => xpcom/tests/TestHashtables.cpp
rename : xpcom/tests/gtest/TestID.cpp => xpcom/tests/TestID.cpp
2016-11-03 23:00:47 -07:00
Eric Rahm a20fe79aec Bug 1313469 - Part 2: Convert TestCOMArray to a gtest. r=froydnj
MozReview-Commit-ID: CEhXX60lpZ8

--HG--
rename : xpcom/tests/TestCOMArray.cpp => xpcom/tests/gtest/TestCOMArray.cpp
2016-11-03 17:55:21 -07:00
Ryan Hunt e7c126d7a0 Bug 1313978 - Don't use Preferences in MainThreadIdlePeriod until they are available r=smaug 2016-10-31 17:30:38 -05:00
Andreas Farre 3aecf57375 Bug 1198381 - Implement the requestIdleCallback feature, r=froydnj,mattwoodrow,smaug
Expose requestIdleCallback on Window and implement running callbacks
in idle periods by posting rICs to the main threads idle queue.

MozReview-Commit-ID: KSYQsyaZ6is

--HG--
extra : rebase_source : 6abd41c2de96b39004f1b2c3c740e81de570970c
2016-08-22 14:52:45 +02:00
Andreas Farre d87b4d239b Bug 1198381 - Extend nsIThread with idleDispatch, r=froydnj,smaug
The intent of idleDispatch is the possibility to have a runnable
executed when the thread is idle. This is accomplished by adding an
event queue for idle tasks that will only be considered when the main
event queue is empty and the caller of ProcessNextEvent doesn't
require that we wait until there is an event on the main event queue.

MozReview-Commit-ID: IDWQfzZqWpZ

--HG--
extra : rebase_source : 0d5bfeebd08e01597c2cd8b76e8e848d9f9c58f0
2016-08-24 16:18:06 +02:00
Phil Ringnalda 445097654c Merge m-i to m-c, a=merge
MozReview-Commit-ID: 56Hspl8LZMY
2016-10-27 19:21:47 -07:00
Gerald Squelart a9a4de3944 Bug 1300476 - Prevent passing references through InvokeAsync - r=froydnj
Passing references to an async call is dangerous because referenced objects
could be destroyed before/during the call, or even be stored by the callee.

The assertion message points at bug 1313497, which is a follow-up to
(eventually) re-allow references in a safer manner.

MozReview-Commit-ID: FTgI5CGCVAe

--HG--
extra : rebase_source : 3062a7441e21617f559accf4476cdafa5575e8ed
2016-10-27 15:13:37 +11:00
Gian-Carlo Pascutto 8b0d2992cb Bug 1310116 - Allow waitpid but warn on creating processes in content. r=jld
MozReview-Commit-ID: JjNfA6wUe3T

--HG--
extra : rebase_source : ad565d238e7554a951d2f6b4e076918bdfd7a450
extra : histedit_source : 127ff408e498f7c687cf6e7f8f7b4e2fbb8c5ae8
2016-10-25 20:43:42 +02:00
Mike Conley 85ea24e315 Bug 1312597 - Increase ThreadStackHelper's initial max buffer size to avoid (chrome script) placeholder in BHR pseudostacks. r=jchen
MozReview-Commit-ID: 6gE4eug7cmY

--HG--
extra : rebase_source : 84b0270f251d6b715fcb2df04005ff437b9d3226
2016-10-25 14:28:23 -04:00
Carsten "Tomcat" Book e42af6918c Backed out changeset 333a899fb5e6 (bug 1198381) 2016-10-25 12:32:56 +02:00
Carsten "Tomcat" Book 1895ce466b Backed out changeset eb2606332cb8 (bug 1198381) 2016-10-25 12:32:54 +02:00
Andreas Farre 1380385c69 Bug 1198381 - Implement the requestIdleCallback feature, r=froydnj,mattwoodrow,smaug
Expose requestIdleCallback on Window and implement running callbacks
in idle periods by posting rICs to the main threads idle queue.

MozReview-Commit-ID: KSYQsyaZ6is

--HG--
extra : rebase_source : 4bdd578b654d05cab600489d30d859452d1bc888
2016-08-22 14:52:45 +02:00
Andreas Farre 60a3a10742 Bug 1198381 - Extend nsIThread with idleDispatch, r=froydnj,smaug
The intent of idleDispatch is the possibility to have a runnable
executed when the thread is idle. This is accomplished by adding an
event queue for idle tasks that will only be considered when the main
event queue is empty and the caller of ProcessNextEvent doesn't
require that we wait until there is an event on the main event queue.

MozReview-Commit-ID: IDWQfzZqWpZ

--HG--
extra : rebase_source : b16ff65d7a9b2fa16216a9ce8756358014d7ad96
2016-08-24 16:18:06 +02:00
Mike Conley 9205728a0e Bug 1312080 - Repeated calls to BackgroundHangMonitor::NotifyWait shouldn't unnecessarily wake the BackgroundHangThread. r=billm
MozReview-Commit-ID: 5NLVIFJ9fmJ

--HG--
extra : rebase_source : e5b6c0d9f1baa7c879cf2a4a60c149f09faa08ec
2016-10-21 14:56:32 -04:00
Byron Campen [:bwc] 70c2bbb4dc Bug 1307350: Compensate for repeating timers that have not been appropriately cancelled. r=froydnj
MozReview-Commit-ID: 20VpLbgSjh4

--HG--
extra : rebase_source : b5b38c69c228b750e986cc502db1a6c2242919b4
2016-10-04 10:23:39 -05:00
Byron Campen [:bwc] bd9637251a Bug 1310925: Acquire a reference before unlocking, just in case. r=froydnj
MozReview-Commit-ID: BLExeLU8AFs

--HG--
extra : rebase_source : f5103a955f21a9f1bdf52130b4e061b5904bea5f
2016-10-18 09:42:13 -05:00
Mike Conley f2fa591912 Bug 1310880 - Allow a BackgroundHangMonitor to have its own private BackgroundHangThread. r=jchen
MozReview-Commit-ID: L32E19FVhv

--HG--
extra : rebase_source : ad279f8a04e2e33a8b37e15674263aa7a1a0efbf
extra : histedit_source : 9f085995ec8d39014a45ab06fb366fb52eb57c6c
2016-10-19 14:32:43 -04:00
Ehsan Akhgari b441f24399 Bug 1309031 - Remove support for prohibiting the background hang monitor; r=froydnj
The code that was using this was removed in bug 1284674.
2016-10-11 09:37:46 -04:00
Byron Campen [:bwc] 060752fb8e Bug 1306733: Don't crash on release builds if mTimer isn't set here. r=froydnj
MozReview-Commit-ID: eupSpSpJU3

--HG--
extra : rebase_source : d943f86b4bc015011f04f26fc8c2190f2472d111
2016-09-30 16:42:45 -05:00
Jan de Mooij 825f1f904e Bug 1306317 - Fix BackgroundHangThread::ReportHang to handle empty mHangStack correctly. r=froydnj
--HG--
extra : rebase_source : c96766e4fc071bc119fe946ee86a045f0b1db4f4
2016-09-30 14:46:19 +02:00
Jan de Mooij e079cbfe2a Bug 1302914 - Use GetThreadContext after calling SuspendThread to ensure threads are really suspended. r=froydnj 2016-09-29 20:05:36 +02:00
Byron Campen [:bwc] 60820e4a14 Bug 1157323 - Part 6: Some comment improvements. r=froydnj
MozReview-Commit-ID: GDLuJS0Wlgh

--HG--
extra : rebase_source : 6156b6ab99aa7b429bec55b0e32500074d59f7a6
extra : source : 32ed23f6341788882a076134a62ae5717c2fbf02
2016-08-05 13:46:07 -05:00
Byron Campen [:bwc] 1a6b8f0e4e Bug 1157323 - Part 5: Remove some unnecessary members. r=froydnj
MozReview-Commit-ID: Fhkq0CZoqQP

--HG--
extra : rebase_source : fb0624ad264173656de1c28ebbafcc509533ebb2
2016-08-05 13:39:34 -05:00
Byron Campen [:bwc] 0f00611fff Bug 1157323 - Part 4: Stop modifying mTimeout/mDelay from the TimerThread, plus some simplification. r=froydnj
MozReview-Commit-ID: 1pMCKLi9DLZ

--HG--
extra : rebase_source : 03eabab8f39865bdb2489a96c809abb99b1fb7d9
2016-08-05 12:50:00 -05:00
Byron Campen [:bwc] d317470863 Bug 1157323 - Part 3: Do not allow mTimeout to change while a timer is in the queue. r=froydnj
MozReview-Commit-ID: 3ZyikUsix8D

--HG--
extra : rebase_source : 94a71aae125f541ef1aee962b1aae69c6e326a42
2016-08-05 10:07:38 -05:00
Byron Campen [:bwc] 0cf5031cd7 Bug 1157323 - Part 2: Factor nsTimerImpl into two classes, so we don't need to do racy stuff in nsTimerImpl::Release. r=froydnj
MozReview-Commit-ID: DAe4TpMqBpA

--HG--
extra : rebase_source : 4caeb1ffc41b0704e5c1c111ef869d8edfb6d30c
2016-07-20 15:16:40 -05:00
Carsten "Tomcat" Book d25a5baeb8 merge mozilla-inbound to mozilla-central a=merge 2016-09-22 11:55:12 +02:00
Eric Faust 121151ec67 Bug 1263595 - Avoid deadlock between the JIT and the gecko profiler on win64. (r=froydnj) 2016-09-15 21:35:14 -07:00
Matt Woodrow 74b953d168 Bug 1288618 - Part 6: Avoid unnecessarily allocating a TailDispatcher for XPCOMThreadWrapper. r=bholley 2016-09-21 21:24:43 +12:00
Carsten "Tomcat" Book f918af64da Backed out 16 changesets (bug 1288618) for bustage on a CLOSED TREE
Backed out changeset 06187d250f7a (bug 1288618)
Backed out changeset 2a47f8ea1d89 (bug 1288618)
Backed out changeset e179c8e8265d (bug 1288618)
Backed out changeset 25396a1af922 (bug 1288618)
Backed out changeset e98f835c6ee5 (bug 1288618)
Backed out changeset 24df0e89b273 (bug 1288618)
Backed out changeset f8bbdabdb6da (bug 1288618)
Backed out changeset 8b0adeab93df (bug 1288618)
Backed out changeset 95f23366de82 (bug 1288618)
Backed out changeset 63a9c689e1d5 (bug 1288618)
Backed out changeset 8f67443dccb8 (bug 1288618)
Backed out changeset 4e7fe69d5f45 (bug 1288618)
Backed out changeset 53b113acee42 (bug 1288618)
Backed out changeset 2583ae4e2e3b (bug 1288618)
Backed out changeset 75a61d0e71b7 (bug 1288618)
Backed out changeset da740b4fd484 (bug 1288618)
2016-09-21 08:44:11 +02:00
Matt Woodrow 4caf5b9aa0 Bug 1288618 - Part 6: Avoid unnecessarily allocating a TailDispatcher for XPCOMThreadWrapper. r=bholley
--HG--
extra : rebase_source : 38596e6ebfc7eb2fb863e242cee718060abe470c
2016-09-21 15:36:09 +12:00
Cervantes Yu 41c36d9c23 Bug 1303940 - MessageLoop::PostDelayedTask() should schedule the runnable on the target thread instead of the current thread. r=froydnj
MozReview-Commit-ID: 8yCY9WSwbAJ

--HG--
extra : rebase_source : 126184b84868977df8b9864eb158a3ad14052365
2016-09-20 14:00:18 +08:00
Jan de Mooij a53986bf29 Bug 1302448 part 1 - Rename CycleCollectedJSRuntime to CycleCollectedJSContext. r=mccr8
--HG--
rename : xpcom/base/CycleCollectedJSRuntime.cpp => xpcom/base/CycleCollectedJSContext.cpp
rename : xpcom/base/CycleCollectedJSRuntime.h => xpcom/base/CycleCollectedJSContext.h
extra : rebase_source : 075214b5057f151520926715b6154e99ae80a0b3
2016-09-14 15:47:32 +02:00
Ben Kelly ae456e0d5c Bug 1300118 P5 Expose the TaskQueue backlog ImpreciseLengthForHeuristics(). r=bholley 2016-09-13 20:12:15 -07:00
Ben Kelly 48310e4429 Bug 1300118 P4 Make nsThread expect NS_DISPATCH_AT_END similar to nsThreadPool. r=bholley 2016-09-13 20:12:15 -07:00
Ben Kelly 11d56a06f0 Bug 1300118 P3 Fix TaskQueue sCurrentThread TLS handling for nsIEventTarget targets. r=jwwang 2016-09-13 20:12:15 -07:00
Ben Kelly e03450312b Bug 1300118 P2 Make TaskQueue implement nsIEventTarget. r=bholley 2016-09-13 20:12:15 -07:00
Ben Kelly f0d440f9d1 Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-13 20:12:15 -07:00
Ben Kelly 46960c09a1 Bug 1300118 P0 Rename NS_DISPATCH_TAIL to NS_DISPATCH_AT_END to avoid confusion with AbstractThread::TailDispatch. r=bholley 2016-09-13 20:12:15 -07:00
Jon Coppeard d97a19687b Bug 1298639 - Use bytecode offsets rather than direct pointer in profiling API r=shu 2016-09-13 14:06:46 +02:00
Wes Kocher 42f4e48aee Backed out 6 changesets (bug 1300118) for frequent Windows VM Xpcshell failures a=backout CLOSED TREE
Backed out changeset 24f714ad248c (bug 1300118)
Backed out changeset 6fe61ed092e8 (bug 1300118)
Backed out changeset dd18e29b64bf (bug 1300118)
Backed out changeset 50882fb40551 (bug 1300118)
Backed out changeset 60e82c1780e5 (bug 1300118)
Backed out changeset e40df52925d5 (bug 1300118)

--HG--
extra : amend_source : 7475f45d827654abe309696d73fd86e75a497c32
2016-09-12 16:34:41 -07:00
Ben Kelly 6cb86a3834 Bug 1300118 P5 Expose the TaskQueue backlog ImpreciseLengthForHeuristics(). r=bholley 2016-09-12 12:32:21 -07:00
Ben Kelly b825ef5df3 Bug 1300118 P4 Make nsThread expect NS_DISPATCH_AT_END similar to nsThreadPool. r=bholley 2016-09-12 12:32:21 -07:00
Ben Kelly 0dbb87a4ff Bug 1300118 P3 Fix TaskQueue sCurrentThread TLS handling for nsIEventTarget targets. r=jwwang 2016-09-12 12:32:21 -07:00
Ben Kelly 98d60c36f2 Bug 1300118 P2 Make TaskQueue implement nsIEventTarget. r=bholley 2016-09-12 12:32:20 -07:00
Ben Kelly 621f6bacd6 Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-12 12:32:20 -07:00
Ben Kelly da78ad445e Bug 1300118 P0 Rename NS_DISPATCH_TAIL to NS_DISPATCH_AT_END to avoid confusion with AbstractThread::TailDispatch. r=bholley 2016-09-12 12:32:20 -07:00
Ben Kelly a8a4ae3c4f Backout rev 5c7368370ff9 to 980659720b86 (bug 1300118 and bug 1300658) for incorrect bug number in commit message. r=me 2016-09-12 12:29:17 -07:00
Ben Kelly b8add141f7 Bug 1300118 P5 Expose the TaskQueue backlog ImpreciseLengthForHeuristics(). r=bholley 2016-09-12 11:21:01 -07:00
Ben Kelly bf25ed725c Bug 1300118 P4 Make nsThread expect NS_DISPATCH_AT_END similar to nsThreadPool. r=bholley 2016-09-12 11:21:01 -07:00
Ben Kelly 6ef08d4672 Bug 1300118 P3 Fix TaskQueue sCurrentThread TLS handling for nsIEventTarget targets. r=jwwang 2016-09-12 11:21:01 -07:00
Ben Kelly 64919e3546 Bug 130118 P2 Make TaskQueue implement nsIEventTarget. r=bholley 2016-09-12 11:21:01 -07:00
Ben Kelly 157b0fe1ed Bug 1300118 P1 Make TaskQueue deliver runnables to nsIEventTarget. r=bholley 2016-09-12 11:21:01 -07:00
Ben Kelly 396475783e Bug 1300118 P0 Rename NS_DISPATCH_TAIL to NS_DISPATCH_AT_END to avoid confusion with AbstractThread::TailDispatch. r=bholley 2016-09-12 11:21:01 -07:00
Wes Kocher 611fb66887 Backed out changeset 39da44265946 (bug 1263595) for build bustage a=backout CLOSED TREE 2016-09-16 14:19:22 -07:00
Eric Faust db0cfdc6bc Bug 1263595 - Avoid deadlock between the JIT and the gecko profiler on win64. (r=froydnj) 2016-09-15 21:35:14 -07:00
Phil Ringnalda 6beabc555f Backed out changeset 48694b762a84 (bug 1263595) for -Werror bustage
CLOSED TREE
2016-09-15 22:04:50 -07:00
Eric Faust c725e729c5 Bug 1263595 - Avoid deadlock between the JIT and the gecko profiler on win64. (r=froydnj) 2016-09-15 21:35:14 -07:00
Carsten "Tomcat" Book 571b01b867 Backed out changeset fdee8d1538b0 (bug 1288618) 2016-09-15 16:34:10 +02:00
Matt Woodrow 9c7f101c32 Bug 1288618 - Part 6: Avoid unnecessarily allocating a TailDispatcher for XPCOMThreadWrapper. r=bholley 2016-09-15 23:17:59 +12:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Nicholas Nethercote 819433bae0 Bug 1299389 - Replace some raw pointers in nsThreadManager. r=froydnj.
nsThreadManager::get() can return a reference. This lets us remove some
redundant assertions.

nsThreadArray elements can be NotNull<>s.

--HG--
extra : rebase_source : fd49010167101bc15f7f6d01bf95fd63b81d60fb
2016-06-10 16:04:49 +10:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Towkir Ahmed 63867da04a Bug 1284887 - Replaced references to mxr.mozilla.org in the codebase with dxr.mozilla.org r=dolske
a=release to get around a hook that's catching these comment-only idl changes

--HG--
extra : rebase_source : a7353680777fd2eeea24c9993f9937bbbcfb9e4f
2016-08-15 17:28:05 -07:00
Igor 175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Nicholas Nethercote 8f51d02c97 Bug 1293117 (part 5) - Change many NS_METHOD occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_METHOD F() override;      --> NS_IMETHOD F() override;
- NS_METHOD F() override {...} --> NS_IMETHOD F() override {...}
- NS_METHOD F() final;         --> NS_IMETHOD F() final;
- NS_METHOD F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 3010fade82a170eab7f13d81bf61b02cd693f3cf
2016-08-08 10:54:50 +10:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Alexandre Lissy 0af5b943b6 Bug 1284674 - Remove NUWA r=cyu
MozReview-Commit-ID: GyMRNzOBKw6

--HG--
extra : rebase_source : 293af1cd55f2035ce6a99f4ebf144059c32a2b8f
2016-08-02 14:54:00 +02:00
JW Wang 50617e1091 Bug 1290338. Part 2 - don't call back to owner functions if the watcher is destroyed. r=bholley
MozReview-Commit-ID: FQkJYtLTBNQ

--HG--
extra : rebase_source : c947ed2de25426815f5260be9b550dfa99f88950
2016-07-29 11:30:16 +08:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Julian Seward 6968f9a027 Bug 1283852 - TSan: data race on nsThreadStartupEvent::mInitialized. r=nfroyd. 2016-07-11 14:14:44 +02:00
Nathan Froyd bab285064e Bug 1283151 - make nsTimerEvent final; r=tbsaunde
Nothing should be deriving from nsTimerEvent, and perhaps this will make
some of the timer code slightly more efficient.
2016-06-29 19:44:03 -04:00
Nathan Froyd 8b24c9d51c Bug 1281626 - part 3 - make various things accept already_AddRefed<nsIRunnable>; r=khuey
All of these things are called with the result of
NS_NewRunnableFunction, so we need to transition them over to a world
where NS_NewRunnableFunction returns something different.
2016-06-28 22:24:54 -04:00
Kyle Huey 706b08a2a3 Bug 1267819: Add a diagnostic assertion. r=froydnj
--HG--
extra : rebase_source : b340fb72636948dcc2fa926599f386ce6ead412f
2016-06-28 10:47:23 -07:00
Boris Zbarsky 53a1c93f93 Bug 767938 part 4. Put an AutoNoJSAPI on the stack while running events off the event loop. r=bholley,khuey 2016-06-24 14:19:50 -04:00
Kirk Steuber 5b3eba1f2b Bug 1263774 - Include memory reports in content process crash reports. r=mccr8, r=aklotz
MozReview-Commit-ID: 7y3GFBZxjsS

--HG--
extra : rebase_source : 9d5aaaa6caad336c85c42002df321b382c90c8a9
2016-06-21 11:45:25 -07:00
Thomas Zimmermann 89ae3af487 Bug 1276927: Fix breakpad to build on B2G, r=mshal
This patch unifies the include search directories for the breakpad
on B2G and Android, and protects breakpad-internal workarounds against
multiple definition.

As a side-effect of the patch set, no more Gonk-specific headers from
'gonk-include' are requried to build toolkit/ or xpcom/. The related
artifacts are removed by this patch.

MozReview-Commit-ID: E94I2rspDtJ
2016-06-16 08:43:51 +01:00
Sebastian Hengst 277e158ff3 Backed out changeset a7cc17d184bd (bug 1276927) 2016-06-15 12:23:59 +02:00
Thomas Zimmermann 5693604fd0 Bug 1276927: Fix breakpad to build on B2G, r=mshal
This patch unifies the include search directories for the breakpad
on B2G and Android, and protects breakpad-internal workarounds against
multiple definition.

As a side-effect of the patch set, no more Gonk-specific headers from
'gonk-include' are requried to build toolkit/ or xpcom/. The related
artifacts are removed by this patch.

MozReview-Commit-ID: E94I2rspDtJ
2016-06-15 10:59:49 +01:00
Ralph Giles 956493cd6e Bug 1275744 - Reference MOZ_LOG in xpcom comments. r=erahm
NSPR_LOG_MODULES is deprecated.

MozReview-Commit-ID: Cel3JCLXLmp

--HG--
extra : rebase_source : da100ece62fd571d19a07455f8c256f5cd39f62b
2016-05-25 15:26:10 -07:00
Xidorn Quan 5c01d7c3ee Bug 1276549 - Remove rvalue reference mark for already_AddRefed params of nsIEventTarget::Dispatch and related methods. r=froydnj
MozReview-Commit-ID: J5RAfGW3X7T

--HG--
extra : source : e1ff4b0d5d9d2599ac00bac376597357ffd58ce0
2016-06-01 10:04:54 +10:00
Nicholas Nethercote 19c16a645a Bug 1272203 (part 2) - Use NotNull in nsThread. r=froydnj. 2016-05-27 09:49:23 +10:00
L. David Baron af57a43c72 Bug 1271182 - Remove MOZ_COUNT_[CD]TOR from nsTimerEvent, since it uses XPCOM reference counting macros. r=khuey
I suspect this will fix the odd behavior we're seeing, although I
haven't really thought through how very closely.

MozReview-Commit-ID: qHgBRAc1PE
2016-05-25 18:04:36 -07:00
L. David Baron fc6592bdbc Bug 1271182 - Add some deleted assignment operators and copy constructors. r=khuey
These are generally good practice for reference-counted objects; they
catch cases where these operations are used by accident, breaking
reference-counting.

This doesn't show any existing problems, though.

MozReview-Commit-ID: EvRkNCymOqT
2016-05-25 18:04:35 -07:00
Andrew McCreight 35eaf64b42 Bug 1273190, part 3 - Fix some modelines in xpcom/. r=froydnj
Autogenerated by modeline.py.
2016-05-24 14:45:44 -07:00
Kyle Huey eacb809d5f Bug 1274114: Factor out main thread specific parts of event processing. r=froydnj 2016-05-22 08:30:03 -04:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Kyle Huey c85171ace9 Bug 1269056: Part 1 - Implement a rough PostDelayedTask equivalent on nsThread. r=froydnj 2016-05-12 15:15:43 -07:00
Randell Jesup f02760cc79 Bug 1213050: clean up TaskQueue before dropping references to it r=cpearce
Also adds assertion TaskQueue isn't trying to kill itself

MozReview-Commit-ID: 1AVuYcfnBBA
2016-05-12 00:53:19 -04:00
Nicholas Nethercote 50166d7047 Bug 1266651 (part 2) - Give nsThreadShutdownContext a proper constructor. r=froydnj. 2016-04-20 11:49:48 +10:00
Nicholas Nethercote 3063dae9e2 Bug 1266651 (part 1) - Rename nsThreadShutdownContext members. r=froydnj.
--HG--
extra : rebase_source : c5c361a2f2f2fa2c1bced5d2a15d294cef01724c
2016-04-20 11:46:35 +10:00
Dan Glastonbury 526fdd85f6 Bug 1224973 - Part 5: Implement suspend decoding for background video. r=cpearce,jwwang,jya
Implemented by short-circuiting calls to RequestVideoData in MDSM so no
frames are decoded. Resuming playback when video moves to foreground by
using the SeekTask/SeekJob/Seek in MDSM with result of GetMediaTime().

Special consideration is made to only seek the video part of Seek() to
remove an audible glitch in the audio playback when the video becomes
visible again.

MozReview-Commit-ID: 7YFDTanslXu
2016-05-12 09:54:15 +10:00
JW Wang fd8704734d Bug 1269963. Part 1 - Add a SyncRunnable::DispatchToThread() overload for AbstractThread. r=bobbyholley.
MozReview-Commit-ID: Jog4glNrUHw
2016-05-04 16:24:25 +08:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Nicholas Nethercote 8d71390a3e Bug 1269648 - Add missing crash-reporter null checks. r=froydnj.
In two places we fail to check if we successful obtained the crash reporter
before we use it.

--HG--
extra : rebase_source : f757b8320788220b5a4d5242a0264d577d92f15e
2016-05-03 17:08:04 +10:00
Kaku Kuo f78f42e9df Bug 1266027 part 1 - make the MediaDecoderReaderWrapper as a proxy of requesting media data; r=jwwang
MozReview-Commit-ID: CgTBPmtbNfh

--HG--
extra : transplant_source : %16%86%F676/S%C8%5Dj%86%9C%09%0E%D9%16L%DB%92y
2016-04-27 14:50:23 +08:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Randell Jesup 58f2a121ce Bug 1267691: Assert on failed attempts to shutdown a thread from itself r=froyd
MozReview-Commit-ID: ByEEd83SVsf
2016-04-27 01:49:48 -04:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Kyle Huey 2709afd167 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey 1cc02aa8c6 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Chris Pearce 4eaf999528 Bug 1245789 - Make XPCOMThreadWrapper::GetCurrent() work. r=bholley
XPCOMThreadWrapper::GetCurrent() is failing because it's not keeping
AbstractThread::sCurrentThreadTLS up to date. This causes assertion failures
during startup of the GMP stack when dispatching via InvokeAsync to the GMP
thread, which is an XPCOM thread wrapped by the XPCOMThreadWrapper.

We can trivially initialize AbstractThread::sCurrentThreadTLS to be the
XPCOMThreadWrapper on the target thread, since it's thread-local-storage, and
the target thread won't change.

MozReview-Commit-ID: EIEFZppR2PS
2016-04-12 16:12:22 +12:00
Wes Kocher 7d2cebe912 Backed out 3 changesets (bug 1263311) for Windows build failures in ServiceWorkerPrivate.cpp CLOSED TREE
Backed out changeset 0434a548e1fe (bug 1263311)
Backed out changeset 60b1be29446c (bug 1263311)
Backed out changeset 18132498bc40 (bug 1263311)

MozReview-Commit-ID: LPEa05QobdQ
2016-04-11 12:50:56 -07:00
Kyle Huey d200ed89d0 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey f13a6fc866 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Bill McCloskey f29390f263 Bug 1222101 - Reorder some thread code (r=jld) a=kwierso
MozReview-Commit-ID: Alg40mu9aU3
2016-03-30 12:20:20 -07:00
JW Wang 4436a4705f Bug 1250829 - add customized assertions for completion promises to facilitate promise chaining. r=bobbyholley.
MozReview-Commit-ID: 5IbbAz0KIBY
2016-03-18 11:27:19 +08:00
JW Wang 7070827866 Bug 1257063 - Don't destruct the runnable inside the lock when TaskQueue::Dispatch fails. r=bobbyholley.
MozReview-Commit-ID: I5KvfHnLUIS
2016-03-18 11:27:15 +08:00
JW Wang 2c1e594fe7 Bug 1236789. Part 2 - fix assertions when |aFlags == NS_DISPATCH_TAIL|. r=bholley
MozReview-Commit-ID: E5a8zP9cMI6
2016-03-15 13:12:27 +08:00
Robert O'Callahan d6063164cd Bug 1236789. Avoid creating an unnecessary thread pool thread for tail-dispatch in TaskQueue. r=bholley
MozReview-Commit-ID: H1rhQPBU00L
2016-01-05 16:35:17 +13:00
Jan Beich aac69f16d7 Bug 1254218 - Rely on old-configure.in to detect dladdr(). r=njn
MozReview-Commit-ID: Ff9DCLu2Cv9
2016-03-07 19:00:41 +00:00
Eric Rahm 4c23f5cd8d Bug 1251482 - Remove remaining references to MOZILLA_XPCOMRT_API from xpcom. r=froydnj 2016-02-26 18:10:56 -08:00
Wes Kocher 72d9604d91 Backed out 8 changesets (bug 1251482, bug 1251494, bug 1251473, bug 1239870) for gtest failures
Backed out changeset f064a5efbb8c (bug 1251494)
Backed out changeset 9e33adec1aa6 (bug 1251482)
Backed out changeset ab0347657e25 (bug 1251473)
Backed out changeset 1d385d4f195d (bug 1239870)
Backed out changeset ceb3e1ee7dda (bug 1239870)
Backed out changeset 8574075bf42f (bug 1239870)
Backed out changeset ba077a3afbc7 (bug 1239870)
Backed out changeset eb99ab06414d (bug 1239870)

MozReview-Commit-ID: 7r9SEk4VGNU
2016-02-26 17:14:57 -08:00
Eric Rahm ae72b68e62 Bug 1251482 - Remove remaining references to MOZILLA_XPCOMRT_API from xpcom. r=froydnj 2016-02-26 15:31:19 -08:00
L. David Baron 795c79ac39 Back out changeset b5ec7338bddf (bug 1236789) on a CLOSED TREE for causing assertions on most (but not all) debug test runs. 2016-02-24 15:45:40 -08:00
Robert O'Callahan 6b5b9dcbc9 Bug 1236789. Avoid creating an unnecessary thread pool thread for tail-dispatch in TaskQueue. r=bholley
MozReview-Commit-ID: H1rhQPBU00L

--HG--
extra : rebase_source : beb861cec3c9587bfe466b6fd34abaa95abd9865
2016-01-05 16:35:17 +13:00
Ted Mielczarek ea6f9a1958 bug 1069556 - sync to Breakpad c53ed143108948eb7e2d7ee77dc8c0d92050ce7c. r=glandium, benwa
This commit contains a few things:
* Update our copy of google-breakpad to upstream c53ed143108948eb7e2d7ee77dc8c0d92050ce7c
* Get rid of all but one local patch, fold a few related local patches into one
* Misc build fixup to sync with upstream--adding a few new moz.build files,
  source files
* The final bits of unhooking Breakpad from the profiler:
** Revert to only building toolkit/crashreporter if MOZ_CRASHREPORTER.
** Stop building bits of Breakpad that we only needed for the profiler.
** Remove a few bits of profiler code that were used to interface with Breakpad.
** Remove toolkit/crashreporter/breakpad-logging, which was only used to
   suppress Breakpad logging for the in-process stackwalker.
* Upstream removed their Android-compat sys/ucontext.h because the Android NDK
  added it, but the bionic we're using for Gonk builds is too old, so add a
  copy of the previous version of those files to
  toolkit/crashreporter/gonk-include to keep Gonk building.
* Consolidate moz.build files under toolkit/crashreporter/google-breakpad/client/linux

--HG--
rename : toolkit/crashreporter/google-breakpad/src/common/pathname_stripper.h => toolkit/crashreporter/google-breakpad/src/processor/pathname_stripper.h
rename : toolkit/crashreporter/google-breakpad/src/common/pathname_stripper_unittest.cc => toolkit/crashreporter/google-breakpad/src/processor/pathname_stripper_unittest.cc
extra : histedit_source : 43e65f5432657f548cac5aa7936461e58454c3b6%2C7b56ccc79d9d58ebde0583d920f3593e25212621
extra : rebase_source : f6dbfb8fb2ba5b27e63b26d57c404962679c7a76
extra : commitid : DMQlXPms868
extra : source : 09fd4f3ab6e764016fe073efb226f03b5969af59
extra : intermediate-source : 16f9d3a6d2ef6a6efd088e3b8eff0a4723daef8f
2016-01-27 09:39:53 -05:00
Nathan Froyd 0e84188646 Bug 1245586 - add debugging aids for thread shutdown; r=khuey
These bits were helpful in debugging recent thread shutdown leaks.
2016-02-03 13:59:26 -05:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Kyle Huey 4e5ab143e9 Bug 1204784: Handle cases in nsThreadPool where Gecko doesn't own the thread that we're running on. r=froydnj 2016-02-01 09:44:52 -08:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Nicholas Nethercote 779cd4aa7b Bug 1241656 - Lazify AutoTaskDispatcher::mDirectTasks. r=bholley.
This avoids large amounts of heap churn while watching YouTube videos on Mac
and Linux.

--HG--
extra : rebase_source : 8606947287574826c455c25336c1a42d77ce6dcc
2016-01-25 13:30:42 +11:00
Xidorn Quan f90e2e16b2 Bug 1237909 part 2 - Do not return value from task for sync dispatch. r=froydnj
--HG--
extra : source : 5ed6de4d870f5eecc24ffba3f752ad43d57cd514
2016-01-25 14:52:34 +11:00
Kyle Huey c82b64a119 Backout upgraded assertion in bug 1204784 to make it easier to star. r=me 2016-01-24 17:02:27 -08:00
Tom Tromey 5412728905 Bug 757969 - use __thread in ThreadLocal; r=froydnj 2016-01-22 10:33:44 -07:00
Vladan Djeric 9ca47b0dff Bug 1241507 - Enable BHR reporting on 100% of the Beta population. r=rvitillo 2016-01-21 10:37:33 -05:00
Vladan Djeric 0322615ac1 Bug 1228437 - Add BHR stats from e10s child process. B2G fix by Ting-Yu Chou. r=nchen 2015-12-26 19:34:11 -05:00
Kyle Huey a80e57e854 Bug 1204784: Do not shut the main thread down before all outstanding asynchronous thread shutdowns complete. r=froydnj
--HG--
extra : rebase_source : 9f4c8a219e2fa6dfbfec78f9f390726f2f07f683
2016-01-18 09:34:38 -08:00
Kyle Huey dc668298f3 Bug 1204784: Upgrade the 'event queue is empty' assertion to a fatal one. r=froydnj 2016-01-15 10:04:14 -08:00
Jan de Mooij 366cd49655 Bug 1237201 part 7 - Handle Vector OOM in nsPerformanceStats, telemetry. r=Yoric 2016-01-14 15:19:37 +01:00
Xidorn Quan f569fa65f9 Bug 1238404 - Use 'using' directive instead of having separate Dispatch impl in subclasses of nsIEventTarget. r=froydnj
--HG--
extra : source : 76255b192a7d6dae74f19c68653537d5f8f39775
2016-01-12 15:18:47 +11:00
Mike Conley e62894147e Bug 1221846 - Get Task Tracer building on desktop r=cyu.
--HG--
extra : rebase_source : 0666526a249c106274a4c764e325cd9810e9a2e7
2015-12-02 20:55:38 -05:00
Jeff Muizelaar e041883a02 Bug 1234618. Fix misdetected BHR hangs. r=jchen
A bunch of threads have their wait time set to PR_INTERVAL_NO_TIMEOUT and so
we divide this by 4 and set waitTime to that. This causes us to wait a very
long but not PR_INTERVAL_NO_TIMEOUT amount of time and so we still update
mIntervalNow and think that we've been hung for a long time when comparing
to the mInterval in the current thread which is set to the previous value of
mIntervalNow.
2015-12-22 18:33:51 -05:00
Chris Peterson 72a9d3bf1f Bug 1234126 - Add Chaos Mode support for setting thread affinity on OS X and Windows. r=froydnj 2015-11-30 19:16:40 -08:00
Andrea Marchesini f2f6c3be20 Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-18 08:44:00 +00:00
Sebastian Hengst fe800f661e Backed out changeset 30839ee209e8 (bug 901097) for mochitest failures on Android and Mulet. r=backout 2015-12-17 14:13:59 +01:00
Andrea Marchesini 35ff8e160c Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-17 12:00:35 +00:00
Wes Kocher e23593462a Backed out changeset 84c8783b8518 (bug 901097) for test_fileReader.html crashes CLOSED TREE
--HG--
extra : commitid : crWlUUwg6J
2015-12-16 09:43:42 -08:00
Andrea Marchesini 7a681c85f9 Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-16 12:37:31 +00:00
Carsten "Tomcat" Book af9ca82bf2 Backed out changeset d74d1e794421 (bug 901097) for bustage on a CLOSED TREE 2015-12-16 11:48:40 +01:00
Andrea Marchesini 97ccffac37 Bug 901097 - FileReader API in workers, r=sicking, r=nfroyd
--HG--
rename : dom/base/test/fileapi_chromeScript.js => dom/workers/test/fileapi_chromeScript.js
2015-12-16 10:15:03 +00:00
Jean-Yves Avenard b9f3760d8a Bug 1229299: Use tail dispatch to notify the mirror of new value. r=bholley
This ensures that tasks are run in the proper order.
2015-12-02 10:41:17 +11:00
Randell Jesup edaa76fc23 Bug 1211602: Never timeout if timeout == UINT32_MAX r=jib,froydnj 2015-11-18 15:03:17 -05:00
Chris H-C f474e96ad9 Bug 1223800 - Accept BHR reports from 50% of beta clients. Up from 1%. r=vladan 2015-11-13 12:09:54 -05:00