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

1573 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Carsten "Tomcat" Book 28bdd40776 Merge mozilla-central to mozilla-inbound 2017-07-28 09:48:24 +02:00
Carsten "Tomcat" Book c24a288e9a Backed out changeset 420d9e53c959 (bug 1351148) for causing regressions / on request from stone 2017-07-28 09:20:54 +02:00
Carsten "Tomcat" Book de369deb98 Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
Carsten "Tomcat" Book 6ddad46b40 Backed out changeset 1662b38e3107 (bug 1351148) 2017-07-28 09:20:23 +02:00
Carsten "Tomcat" Book bd7b184c91 Backed out changeset e3e924da5d5f (bug 1383328) 2017-07-28 09:20:05 +02:00
Carsten "Tomcat" Book 6f0703e0c4 Backed out changeset 95c0feba19ec (bug 1369002) 2017-07-28 09:19:59 +02:00
Nicholas Nethercote 200d8ec18b Bug 1384835 (part 3) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
This is similar like the previous patch, but for the 8-bit string variants.
Also, it changes assignment to Adopt() in GetCString() and GetDefaultCString()
to avoid an extra copy.

--HG--
extra : rebase_source : eba805c3a7b809d5ccd6e853b1c9010db9477667
2017-07-27 16:45:10 +10:00
Markus Stange 1ab4633a9c Bug 1384631 - Make SystemGroup::Dispatch work early during startup, when it hasn't been initialized yet. r=billm
MozReview-Commit-ID: 4VUmmXPXor6

--HG--
extra : rebase_source : a4fa38e980d358beccfe23f2c91eb3c711c34d1f
extra : amend_source : 529bce651e2ae9a0c42be86e114f67bd04c29f34
2017-07-27 14:18:54 -04:00
Bevis Tseng 95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Bevis Tseng d935b29e72 Bug 1378930 - Part 1: Remove nsINamed::SetName(). r=billm
MozReview-Commit-ID: 7aM1yJRsfPH

--HG--
extra : rebase_source : f207a37be835ac4e6c431af56737cebacf5c566d
2017-07-21 11:50:43 +08:00
Eric Rahm 08daad2b64 Bug 1369002 - Stop warning if the mainThread is null in GetCurrentThread. r=froydnj 2017-06-20 09:51:29 -07:00
Nathan Froyd a6c96367a7 Bug 1347963 - part 1 - introduce mozilla::RecursiveMutex; r=erahm
Having a proper recursively-acquirable mutex type makes intent clearer,
and RecursiveMutex also happens to be somewhat faster than
ReentrantMonitor.
2017-03-14 14:05:51 -04:00
Bill McCloskey fff3f0890c Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-25 19:52:36 -07:00
Nicholas Nethercote 2a4f265a62 Bug 1381727 (part 2) - Remove SmprintfFree(). r=glandium.
It's just a complex wrapper for free(), or equivalent function. (In practice,
all the uses end up in free().)

--HG--
extra : rebase_source : 247ea8458aa57319bd1c8366115a9b4f39ed5a33
2017-07-25 09:09:25 +10:00
Daniel Holbert 6c89198a2f Bug 1349683: Give RevocableEventPtr a "move" assignment operator, and use it to reduce refcount churn. r=froydnj
MozReview-Commit-ID: 9JQXZJqebm2

--HG--
extra : rebase_source : dea9940c9041567b7995b851624a210f08d04f30
2017-07-19 00:03:59 -07:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Stone Shih 5c6d99d228 Bug 1351148 Part3: Synthesize native input events with priority. f=kats,smaug. r=smaug.
The test helper_touch_action_regions.html uses nsDOMWindowUtils to synthesize native input events and creates some runnables to trigger the test. It expects the runnables which synthesize native input events are processed first, then the runnables to continue the test, and finally the input events are forwarded from chrome process to content process. Enabling event prioritization may change the execution order.
Wraps those runnables to synthesize native input events as priority=input and dispatches those runnables to continue the test with priority=input to make sure the execution order is as expected.

MozReview-Commit-ID: 8hkaB1FRW9T
2017-05-19 15:41:24 +08:00
Stone Shih 9573b6e439 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Stone Shih afa6a2e045 Bug 1351148 Part1: Add include header to TimerThread.h to fix compile errors. r=smaug.
MozReview-Commit-ID: 65UfFMwmSrm
2017-05-29 17:19:17 +08:00
Nicholas Nethercote e99e711d3f Bug 1382099 - Remove MOZ_WIDGET_GONK from xpcom/. r=erahm.
As well as the straightforward things, this lets us remove ReadSysFile and
WriteSysFile, which in turn lets us remove TestFileUtils.cpp.

--HG--
extra : rebase_source : fc90c05352e654ffc41009d8504a9c54f394fc3f
2017-07-21 10:45:39 +10:00
Andrew Osmond 8bc3918397 Bug 1359833 - Part 0. Add SchedulerGroup::IsSafeToRunUnlabeled method to determine if running in an unlabeled context. r=billm 2017-07-19 14:15:11 -04:00
Michael Layzell c9b99e80ad Bug 1380096 - Avoid non-null terminated strings and heap for main thread runnable name, r=erahm
For some reason, I continuously ran into windows x64 specific failures when
trying to read this heap allocated data while the main thread was paused. I
don't know specifically how this happened, but I am able to avoid it by instead
directly allocating the buffer in a `mozilla::Array` in static storage, and
copying that data instead.

MozReview-Commit-ID: 473d6IpHlc4
2017-07-17 16:30:02 -04:00
Andrea Marchesini 50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02:00
Wes Kocher b4fca1d196 Backed out 4 changesets (bug 1365309) for frequent xpcshell timeouts after 5400 seconds a=backout CLOSED TREE
Backed out changeset 9fc4c6aabd8e (bug 1365309)
Backed out changeset 56850220bd77 (bug 1365309)
Backed out changeset 48f5e0597242 (bug 1365309)
Backed out changeset 39ed96d7b263 (bug 1365309)

MozReview-Commit-ID: 3V0eTL8qeYb
2017-07-12 16:35:14 -07:00
Sebastian Hengst 8f1249fa0d Backed out changeset 8fe427b20f90 (bug 1380096) for crashing Marionette test_refresh_firefox.py TestFirefoxRefresh.testReset and mochitests on Windows x64. r=backout on a CLOSED TREE 2017-07-12 23:36:58 +02:00
Michael Layzell 2321f62b21 Bug 1379763 - Part 2: Avoid leaking the bhr-thread-hang runnable when shutting down, r=smaug
Unfortunately during shutdown we can sometimes leak the runnable passed into
SystemGroup::Dispatch. It is leaked instead of being freed off main thread
because we sometimes are passing data which can only be freed on the main thread
safely to the main thread, and running the destructor on the wrong thread could
be really bad.

This is a really really gross workaround for that issue which helps to avoid the
XPCOM leak checker failures which were appearing on try.

MozReview-Commit-ID: GTfdxKnsTae
2017-07-12 17:13:46 -04:00
Michael Layzell 4abca6951d Bug 1379763 - Part 1: Add a bhr-thread-hang observer, r=mconley
MozReview-Commit-ID: 4g8VUjZBiYH
2017-07-12 17:13:46 -04:00
Michael Layzell c93fca087e Bug 1380096 - Don't require that sMainThreadRunnableName is null-terminated, r=erahm
MozReview-Commit-ID: 9Zo1vjmKzZC
2017-07-12 15:10:44 -04:00
Michael Layzell a7a732298b Bug 1365309 - Part 4: Disable the BackgroundHangMonitor in GMP processes, r=froydnj
This involved a change to BackgroundHangMonitor, as it initialized sDisabled
incorrectly to false, instead of true, We need sDisabled initialized to true, as
we cannot assume that it is enabled until BackgroundHangMonitor::Startup() is
called.

MozReview-Commit-ID: 94slLTkNk3C
2017-07-12 13:13:07 -04:00
Michael Layzell 403cfbc0a1 Bug 1365309 - Part 3: Disable ThreadStackHelper on x86 linux due to a LUL crash, r=froydnj
MozReview-Commit-ID: 2kBBFftnJEd
2017-07-12 13:13:07 -04:00
Michael Layzell 806614c9f6 Bug 1365309 - Part 2: Re-enable the Background Hang Reporter on Linux, r=froydnj
MozReview-Commit-ID: EjAti9UqW7k
2017-07-12 13:13:07 -04:00
Michael Layzell b34e7c42ec Bug 1365309 - Part 1: Move LUL to a separate lock, and initialize it outside of both the profiler and BHR lock on the BHR thread, r=njn
Currently LUL is a member of CorePS, meaning that it is guarded by the PSMutex.
This mutex is grabbed by the main thread at random points during the execution
of the program. This is unfortunate, as initializing LUL can take a long
time (>1s on my local machine), and we definitely don't want to be blocking the
main thread waiting for it.

In addition, in the BHR case, we used to be grabbing LUL when we got our first
hang, while both the PSMutex and the BHR monitor were being held. This meant
that the main thread could make no progress during LUL initializaion, as the BHR
monitor is grabbed by the main thread on every spin of the event loop.

This patch moves that initialization to be behind a completely separate lock,
and makes BHR initialize it on the background thread before acquiring the BHR
lock, meaning that no locks other than the one guarding LUL should be held
during its initialization.

MozReview-Commit-ID: GwNYQaEAqJ1
2017-07-12 13:13:07 -04:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Tom Ritter 70e18ce213 Bug 1377605 Cast -1 to DWORD to correctly match the error return value given by SuspendThread r=aklotz
MozReview-Commit-ID: 5XHgkpQJQKY

--HG--
extra : rebase_source : 92d963e3415840eebbe47bf835ec6fb20489d908
2017-07-03 16:07:25 -05:00
Michael Layzell 2eb92d98f1 Backout Bug 1365309 for test failures on a CLOSED TREE
MozReview-Commit-ID: 143ac9l7Goq
2017-07-04 17:31:13 -04:00
Michael Layzell b24bf46af6 Bug 1377344 - Record the name of the currently running Runnable on thread hangs for BHR, r=njn, r=froydnj
MozReview-Commit-ID: IYRHh6jiTeo
2017-07-04 15:16:19 -04:00
Michael Layzell a318e760bd Bug 1365309 - Part 4: Disable the BackgroundHangMonitor in GMP processes, r=froydnj
This involved a change to BackgroundHangMonitor, as it initialized sDisabled
incorrectly to false, instead of true, We need sDisabled initialized to true, as
we cannot assume that it is enabled until BackgroundHangMonitor::Startup() is
called.

MozReview-Commit-ID: 94slLTkNk3C
2017-07-04 13:19:26 -04:00
Michael Layzell 256c09a0f1 Bug 1365309 - Part 3: Disable ThreadStackHelper on x86 linux due to a LUL crash, r=froydnj
MozReview-Commit-ID: 2kBBFftnJEd
2017-07-04 13:19:26 -04:00
Michael Layzell 4c2edc54a7 Bug 1365309 - Part 2: Re-enable the Background Hang Reporter on Linux, r=froydnj
MozReview-Commit-ID: EjAti9UqW7k
2017-07-04 13:19:26 -04:00
Michael Layzell 1fda892d36 Bug 1365309 - Part 1: Move LUL to a separate lock, and initialize it outside of both the profiler and BHR lock on the BHR thread, r=njn
Currently LUL is a member of CorePS, meaning that it is guarded by the PSMutex.
This mutex is grabbed by the main thread at random points during the execution
of the program. This is unfortunate, as initializing LUL can take a long
time (>1s on my local machine), and we definitely don't want to be blocking the
main thread waiting for it.

In addition, in the BHR case, we used to be grabbing LUL when we got our first
hang, while both the PSMutex and the BHR monitor were being held. This meant
that the main thread could make no progress during LUL initializaion, as the BHR
monitor is grabbed by the main thread on every spin of the event loop.

This patch moves that initialization to be behind a completely separate lock,
and makes BHR initialize it on the background thread before acquiring the BHR
lock, meaning that no locks other than the one guarding LUL should be held
during its initialization.

MozReview-Commit-ID: GwNYQaEAqJ1
2017-07-04 13:19:26 -04:00
Bill McCloskey 224d56eb18 Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj)
MozReview-Commit-ID: 9zN9aAd7daA
2017-07-03 16:19:56 -07:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Andreas Farre 6fd53fe558 Bug 1372856 - Implement GetName for IdleRunnableWrapper. r=froydnj 2017-06-29 23:55:56 +02:00
Mats Palmgren 008ea680be Bug 1376487 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 7rLiC9ZeIhp
2017-06-28 01:03:17 +02:00
JW Wang 8a5ba394b7 Bug 1371982 - Use a RefPtr<> to hold the MozPromise. r=gerald 2017-06-26 20:13:27 -04:00
Bill McCloskey d5f10f6b39 Bug 1372405 - Remove NewRunnable functions that lack a name param (r=froydnj)
MozReview-Commit-ID: vGCnkBey03
2017-06-26 14:19:58 -07:00
Bill McCloskey d808e4bea3 Bug 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj)
MozReview-Commit-ID: 9L4UoBJWzQ3
2017-06-26 14:19:58 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Bill McCloskey 3f0e196a4c Bug 1372405 - Change SchedulerGroup::GetName so it doesn't delegate to mozilla::Runnable (r=froydnj)
Delegating to mozilla::Runnable caused us to return the wrong value once
SchedulerGroup started passing a non-empty name to the Runnable constructor.

MozReview-Commit-ID: 2zMlpiMnHwv
2017-06-26 14:19:58 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Andreas Farre 059d5cc125 Bug 1374514 - Don't use alias for SetDeadline signature. r=nfroyd 2017-06-19 23:59:00 +02:00
Nicholas Nethercote 033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Andreas Farre 2a138dd325 Bug 1368072 - Move idle dispatch to thread manager. r=froydnj
Also exposes idle dispatch with timeout.
2017-06-22 11:14:10 +02:00
Phil Ringnalda 08e2f5187b Backed out 3 changesets (bug 1368072) for colliding with a new use of the thing it was renaming
Backed out changeset 1d7e008d7d70 (bug 1368072)
Backed out changeset c4a1ddf9be0d (bug 1368072)
Backed out changeset ba1cdae5a8d6 (bug 1368072)
2017-06-21 23:28:37 -07:00
Wes Kocher ac0fd2038c Merge inbound to m-c a=merge
MozReview-Commit-ID: 3LXFVwSoMvs
2017-06-21 17:58:17 -07:00
Nathan Froyd b28fcc5c4b Bug 1372670 - part 5 - add nsIThreadManager::spinEventLoopUntilEmpty; r=erahm,florian
A number of places in JS need to drain the current thread's event queue,
which cannot be done with nsIThreadManager::spinEventLoopUntil, since we
need to not wait for an incoming event when attempting to process one.
2017-06-21 12:59:28 -04:00
Nathan Froyd 27c58cf89f Bug 1372670 - part 3 - add spinEventLoopUntil to nsIThreadManager; r=erahm,florian 2017-06-21 12:59:28 -04:00
Nathan Froyd 2c70f522cc Bug 1372670 - part 2 - remove nsIThreadManager::isMainThread; r=erahm
Nobody calls this from JS, and we have better ways to accomplish the
same task in C++
2017-06-21 12:59:28 -04:00
Nathan Froyd e6133920ca Bug 1372670 - part 1 - remove non-MOZILLA_INTERNAL_API NS_IsMainThread(); r=erahm
Everybody who cares about this function calls it from within libxul.
2017-06-21 12:59:28 -04:00
Sebastian Hengst 17c1285d32 Backed out changeset 733c828d5ba3 (bug 1355746) for frequently failing mochitest dom/html/test/test_fullscreen-api.html and devtools' browser_service_workers_multi_content_process.js, both on Linux. r=backout a=backout
MozReview-Commit-ID: 7VDiCD8uwOy
2017-06-21 19:51:13 +02:00
Sebastian Hengst b2f7adcc7d Backed out changeset 38722eed8c8a (bug 1355746)
MozReview-Commit-ID: 1HcpK10x0V4
2017-06-21 19:49:04 +02:00
Phil Ringnalda 44f60566a9 Backed out 3 changesets (bug 1368072) for timeouts in test_TelemetrySession.js and test_fullscreen-api.html and unhandled "TypeError: Services.tm.mainThread.idleDispatch is not a function" promise rejections
Backed out changeset 357635c84e49 (bug 1368072)
Backed out changeset 1797afe16a2a (bug 1368072)
Backed out changeset 4782401394a9 (bug 1368072)

MozReview-Commit-ID: 6kdcSkERjTD
2017-06-20 21:41:14 -07:00
Wes Kocher c0e1236f1a Merge autoland to m-c a=merge
MozReview-Commit-ID: LFtpTAueYrF
2017-06-20 18:24:29 -07:00
Carsten "Tomcat" Book 956f2121eb Backed out changeset ce7c27a7a91e (bug 1372405) for bustage in fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
--HG--
extra : rebase_source : 6e612ad00e834b2cf4014fdd3fbbc33c716ecf80
2017-06-21 13:59:42 +02:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Carsten "Tomcat" Book 4f575539e6 Backed out changeset 328c356c0bcd (bug 1372405)
--HG--
extra : rebase_source : 643149a6a75f94c8d1000882d3a679d2c1418345
2017-06-21 13:59:20 +02:00
Carsten "Tomcat" Book 8e9d47abae Backed out changeset f4521f4c0fc3 (bug 1372405)
--HG--
extra : rebase_source : 1762fbc22a4cb72330b6867fb34cb032e97985ce
2017-06-21 13:59:18 +02:00
Gerald Squelart 2d68784a91 Bug 1374594 - Allow mutex/monitor scoped unlockers to be constructed from their locking counterparts - r=froydnj
MozReview-Commit-ID: 7PResfLcEeO

--HG--
extra : rebase_source : aab88391ef689bf92742a0ef37729d664dd528b3
2017-06-20 22:20:49 +12:00
Andreas Farre 2a8a39cf8e Bug 1368072 - Move idle dispatch to thread manager. r=froydnj
Also exposes idle dispatch with timeout.
2017-06-21 12:36:41 +02:00
Eric Rahm 23446e3a7b Bug 1374414 - Stop warning if target is null in idle dispatch. r=froydnj 2017-06-20 10:31:33 -07:00
Andreas Farre 9598aa65ed Bug 1368072 - Move idle dispatch to thread manager. r=froydnj
Also exposes idle dispatch with timeout.
2017-06-19 06:36:00 +02:00
Carsten "Tomcat" Book 583566fabf Backed out changeset 301e80f20046 (bug 1372405) for bustage
--HG--
extra : rebase_source : e878e085dc4f872e3af0d9f98337ac6d2e86f37a
2017-06-20 08:27:17 +02:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Carsten "Tomcat" Book 3b7856021f Backed out changeset ac1e2098e59e (bug 1372405)
--HG--
extra : rebase_source : 6cd7f407dd9c0ed1449cfa3efe72e72db3c18e32
2017-06-20 08:26:57 +02:00
Carsten "Tomcat" Book 1083602212 Backed out changeset 4d33d0e50338 (bug 1372405)
--HG--
extra : rebase_source : e615bdaa0bca09ea4b39c732dd952d2faddb8207
2017-06-20 08:26:56 +02:00
Bill McCloskey 78272721a6 Bug 1372405 - Remove NewRunnable functions that lack a name param (r=froydnj)
MozReview-Commit-ID: vGCnkBey03
2017-06-19 22:25:47 -07:00
Bill McCloskey b37fc62051 Bug 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj)
MozReview-Commit-ID: 9L4UoBJWzQ3
2017-06-19 22:25:47 -07:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bill McCloskey 8fb9da1035 Bug 1372405 - Change SchedulerGroup::GetName so it doesn't delegate to mozilla::Runnable (r=froydnj)
Delegating to mozilla::Runnable caused us to return the wrong value once
SchedulerGroup started passing a non-empty name to the Runnable constructor.

MozReview-Commit-ID: 2zMlpiMnHwv
2017-06-19 22:20:08 -07:00
Bevis Tseng 03f90b6e33 Bug 1372453 - Part 1: Support to name the callers of ProxyReleaseEvent. r=froydnj
MozReview-Commit-ID: 8rmwqzPrzM7
2017-06-13 18:10:13 +08:00
Andreas Farre 67964eb4e6 Bug 1371274 - Don't call SetDeadline on receivers without one. r=froydnj
Check if the receiver has SetDeadline and use a specialization that
doesn't use it if it isn't present. This makes it possible to call:

NewIdleRunnable(obj, Obj::Method)

where Obj doesn't need to implement SetDeadline. This makes it easier
to avoid unnecessary wrappers.

--HG--
extra : rebase_source : 83c30b0590475d65b072b41c466321330af07dc7
2017-06-16 07:50:00 +02:00
Michael Layzell cc6563e878 Bug 1369594 - Get module information for BHR off main thread, r=froydnj
MozReview-Commit-ID: L0ANHNKKAkY
2017-06-16 14:55:15 -04:00
Olli Pettay 2edc8a2488 bug 1358898, ensure AsyncFreeSnowWhite is run often enough, r=mccr8,nfroyd 2017-06-16 20:00:04 +03:00
Bill McCloskey 0767e31489 Bug 1372736 - Avoid using AbstractThread for non-media MozPromises (r=bkelly)
MozReview-Commit-ID: BBi0pK4DXxf
2017-06-15 20:16:25 -07:00
Bill McCloskey 1158c7c282 Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly)
MozReview-Commit-ID: Kchg4kqBERt
2017-06-15 20:16:25 -07:00
Michael Layzell b2730ca921 Bug 1373281 - Null-check mStackToFill before collecting psuedostacks, r=froydnj
This was causing a crash on nightly. The browser would try to collect only a
native stack, and then attempt to dereference the null pointer for the
pseudostack. I think this didn't happen on infra as it only occurs when the user
has hung a sufficient number of times.

MozReview-Commit-ID: 6RSW2llKBjT
2017-06-15 17:04:42 -04:00
Michael Layzell 7121551189 Bug 1357829 - Part 2: Use profiler_suspend_sample_thread in the background hang monitor, r=froydnj
This patch uses the profiler_suspend_sample_thread method which was added in
part 1.

With this patch, we no longer manually run code to pause the target thread,
instead using the profiler's provided code to do so. In addition, we no longer
manually walk the stack to collect native stack frames, instead relying on the
profiler's cross-platform stack walking logic.

This helps remove some of the code from ThreadStackHelper which was redundant
with the profiler. Much of the pseudostack code in ThreadStackHelper is also
redundant, and should hopefully be eliminated in a follow-up.

MozReview-Commit-ID: 4RjLHt6inH9
2017-06-14 12:27:49 -04:00
Ehsan Akhgari 562c07cb88 Bug 1371728 - Don't honor the idle period during shutdown; r=smaug 2017-06-14 08:27:39 -04:00
Bill McCloskey c85ab6308c Bug 1366072 - Change promises to take nsISerialEventTarget instead of AbstractThread (r=jwwang)
MozReview-Commit-ID: 4azUhSB6whu
2017-06-13 14:51:01 -07:00
Bill McCloskey 40acc9e3a0 Bug 1366072 - Make AbstractThread inherit from nsISerialEventTarget (r=jwwang)
MozReview-Commit-ID: 5L3gUEyGfyL
2017-06-13 14:50:58 -07:00
Bill McCloskey 90c9540b82 Bug 1366072 - Remove useless ThenCommand::mResponseThread field (r=jwwang)
MozReview-Commit-ID: F9shMirkSiu
2017-06-13 14:50:56 -07:00
Henry Chang a221ac674f Bug 1355746 - Part 2. Polish IdleTaskRunner and reuse it for background parsing. r=smaug
This patch is mainly to make IdleTaskRunner reusable by nsHtml5TreeOpExecutor.
The only necessary work to that purpose is to remove the dependency of
sShuttingDown, which was a static variable in nsJSEnvironment.cpp.
The idea is to have a "ShouldCancel" as a callback for the consumer to
return sShuttingDown.

In addition to sShuttingDown, we use std::function<bool()> as the runner
main callback type.

MozReview-Commit-ID: FT2X1unSvPS

--HG--
extra : rebase_source : cfd99aba19f014327875683f5ea85d183c8af674
extra : intermediate-source : 99af874c7b1d278057194894d406474b8af07349
extra : source : 792359c898f68241e1373820ea8fd3ba18b09994
2017-06-15 15:51:29 +08:00
Henry Chang e13aeee5fd Bug 1355746 - Part 1. Rename CollectRunner to IdleTaskRunner and move to xpcom/threads/IdleTaskRunner.h/cpp r=smaug
Nothing is changed in this patch except for renaming and code move around.
The strategy is to have the final file setup in this patch without any
detail change. The actual code change will be in the next patch so that
we can focus on reviewing the diff in the next patch regarding IdleTaskRunner.

MozReview-Commit-ID: 4Bul9mZ7z1n

--HG--
extra : rebase_source : 21d7d601c70304d69100d96cecfdb3e0322cb777
extra : intermediate-source : 366862231c26e085fe749012a09418aa31936224
extra : source : 7b4e77911d1471c33fda0a43b50ed17c5274e795
2017-06-15 14:47:56 +08:00
Aaron Klotz 77f4e5b25c Bug 1372422: Make mozilla::HangMonitor::IsUIMessageWaiting always return false in content processes; r=jimm
MozReview-Commit-ID: 3OoH1ptkyeL
2017-06-12 17:19:50 -06:00
Nicholas Nethercote 0be77baa96 Bug 1370329 (part 1) - Clean up the profiler's RAII classes. r=mstange.
This patch does the following renamings, which increase consistency.

- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel

Plus a few other minor ones (e.g. local variables).

The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.

--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
2017-06-07 12:33:19 +10:00
Bill McCloskey bd66079b0c Bug 1371127 - Use GetCurrentVirtualThread() in MediaManager (r=jesup)
MozReview-Commit-ID: 2Wf9Ln8TMOx
2017-06-12 20:21:43 -07:00
Bill McCloskey 2ab0191db6 Bug 1365102 - Convert NS_GetCurrentThread uses in xpcom/ (r=froydnj)
MozReview-Commit-ID: 69qVzf8QJMq
2017-06-12 20:21:43 -07:00
Bill McCloskey 171ac66ce4 Bug 1361164 - Add Get{Current,Main}ThreadEventTarget getters to replace NS_Get{Current,Main}Thread (r=froydnj)
We want people to transition to using event targets rather than threads when possible. These
getters should make it easier to make that change.

MozReview-Commit-ID: 3bN4tRgJjBL
2017-06-12 20:20:08 -07:00
Bill McCloskey 595e5d79c8 Bug 1361164 - Add nsISerialEventTarget (r=froydnj)
MozReview-Commit-ID: 8y1GdEGCPSB
2017-06-12 20:20:08 -07:00
Bill McCloskey 5ddda3bb77 Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj)
MozReview-Commit-ID: 12bk9hQ7Wnv
2017-06-12 20:20:08 -07:00
Eric Rahm 32235488fc Bug 1370644 - Part 1: Only use NS_ERROR for an imminent failure. r=froydnj
This modifies the logic in |CheckAcquisition| to only call |NS_ERROR| if we're
really going to deadlock. Instead, if we detect a suspicious cycle, we just use
an |NS_WARNING|. This means that we'll still output warning text in debug
builds, but we won't cause the process to abort.

MozReview-Commit-ID: 71mFInWwbDY
2017-06-12 16:53:04 -04:00
Gerald Squelart 9438822797 Bug 1371880 - Use Variant with indexed access in MozPromise::ResolveOrRejectValue - r=jwwang
MozReview-Commit-ID: 4vobU19ebaX

--HG--
extra : rebase_source : fe1e73a3fdf3a5d612a41b53aca9c9f2ea363456
2017-06-12 11:19:58 +12:00
Sebastian Hengst 943953276a Backed out changeset 091c5613b5cf (bug 1370644) for failing GTest XPCOMDeadlockDetectorTest.XPCOMSanity3DeathTest | Death test: Sanity3_Child(). r=backout 2017-06-10 10:34:03 +02:00
Olli Pettay c6e5adc488 Bug 1371438, investigate why assertion fails on Windows, r=bkelly 2017-06-10 03:21:29 +03:00
Eric Rahm e1cf6f5041 Bug 1370644 - Part 1: Only use NS_ERROR for an imminent failure. r=froydnj
This modifies the logic in |CheckAcquisition| to only call |NS_ERROR| if we're
really going to deadlock. Instead, if we detect a suspicious cycle, we just use
an |NS_WARNING|. This means that we'll still output warning text in debug
builds, but we won't cause the process to abort.

MozReview-Commit-ID: 71mFInWwbDY
2017-06-09 16:09:17 -07:00
Ryan VanderMeulen 9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00
Andreas Farre cf4cd748f1 Bug 1292600 - Add telemetry to measure how idle budgets are used. r=froydnj, data-r=bsmedberg 2017-06-07 16:14:42 +02:00
Wes Kocher bb1d061819 Merge inbound to central, a=merge CLOSED TREE
UPGRADE_NSS_RELEASE UPGRADE_NSPR_RELEASE

MozReview-Commit-ID: 2CXltQtu4Y1

--HG--
extra : amend_source : 16333c0fa5342dfbbb2a4ded71f94119a022e27b
2017-06-06 17:15:21 -07:00
Ehsan Akhgari 19d6dc61bb Bug 1368286 - Take the idle queue into account in nsThread::HasPendingEvents(); r=smaug 2017-06-06 12:37:27 -04:00
Sylvestre Ledru aa1c00fb9f Bug 1370369 - Use the new MOZ_DIAGNOSTIC_ASSERT_ENABLED instead of several defines - follow up patch r=froydnj
MozReview-Commit-ID: I4ffmvKClc6

--HG--
extra : rebase_source : 0039cd09dfb199f77a1cbdca3bfdbcab21cc0049
2017-06-05 23:43:34 +02:00
Sebastian Hengst a0bd7b9c0d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: BDyuSdNALvH
2017-06-06 11:20:56 +02:00
Nicholas Nethercote 1b418b1c18 Bug 1369644 - Remove use of |volatile| from ProfileEntry. r=mstange,shu,jseward,froydnj.
These annotations aren't doing anything useful. The important thing with
the PseudoStack is that, during pushes, the stack pointer incrementing happens
after the new entry is written, and this is ensured by the stack pointer being
Atomic.

The patch also improves the comments on PseudoStack.

--HG--
extra : rebase_source : 100f8a5e4b750c15fac66175550c4c284a141f16
2017-06-02 17:16:56 +10:00
Olli Pettay e4559f5c3b Bug 1368493, TimerThread::FindNextFireTimeForCurrentThread should look at timers in order, r=bkelly
--HG--
extra : rebase_source : a86b344380cbcd34d8930688eb90192846636dd8
2017-06-05 16:49:54 +03:00
Wes Kocher 7faba1c580 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 81kvO3JCHf0
2017-06-05 17:43:44 -07:00
Masayuki Nakano 94170bb269 Bug 1370198 Back out the patch for bug 1369419 because the patch couldn't fix bug 1361132 and causes new crash bugs r=jimm
MozReview-Commit-ID: Eq7Dkk6Ghwc

--HG--
extra : rebase_source : edc2d10f4e0359152927830a269f74b75daf5883
2017-06-05 21:52:16 +09:00
JW Wang 531fbb106b Bug 1367679. P4 - specialize the type of mCompletionPromise according to whether chaining is supported. r=gerald
MozReview-Commit-ID: 8dPXiGl5njE

--HG--
extra : rebase_source : f38a5ddfcf9789d623e2de7776ae4e8a33448225
extra : intermediate-source : d3447a672312867335e5e7a5ee320b34f7f91ead
extra : source : ec5fa27b3c4f65acc7719ffaa9931bd4a5476a47
2017-06-02 10:16:31 +08:00
JW Wang c6caf473c8 Bug 1367679. P3 - pass mCompletionPromise to InvokeCallbackMethod(). r=gerald
This reduces duplicate code by handling promise chaining in one place.

MozReview-Commit-ID: 474T5hvf9oM

--HG--
extra : rebase_source : b8de5bad5597234654d476b93c0c89abc5215073
extra : intermediate-source : b0f3d3fef28646c31c87acfbfbf36ec9329e7a6c
extra : source : 89aab3206558922271aff1d611f029aed3910acf
2017-05-31 17:28:09 +08:00
JW Wang c58f498b84 Bug 1367679. P2 - overload InvokeCallbackMethod() according to whether promise-chaining is supported. r=gerald
This patch fixes InvokeCallbackMethod() which should return null
if promise-chaining is not supported.

Before this patch, it could return non-null if one of the resolve/reject callbacks
returns a MozPromise while the other not.

MozReview-Commit-ID: 7YKNvRKEHQx

--HG--
extra : rebase_source : 6429d9eef35efa0128e8b5967097850e6f4a4325
extra : intermediate-source : 6f73de7d2d5fb01be19fdf7d7037b506425eab18
extra : source : a1849e24b09b0b4e986ffaef14d2602541c1c6e8
2017-05-31 17:08:08 +08:00
JW Wang 71260a8c0f Bug 1367679. P1 - refactor InvokeCallbackMethod() to deal with one concern at a time. r=gerald
InvokeMethod() handles optional arguments.
InvokeCallbackMethod() handles optional return value.

MozReview-Commit-ID: AyT6TEKRqbs

--HG--
extra : rebase_source : 9327dfe75f4cb0a23925aaa7dd939b8a2ae1a95d
extra : intermediate-source : cc1df19154f7371bd6ab98ef490e1ad10c3c0ea9
extra : source : 719d64b06a0e9a345f402b8c721d08ff511a5c1b
2017-05-26 00:12:29 +08:00
JW Wang ea2f8c0d3a Bug 1370005. P1 - backout bug 1367679. r=gerald
MozReview-Commit-ID: 4SUCinaz3Cj

--HG--
extra : rebase_source : 2d6f7fec44a8fb4dd3a526ec6bd2cd5737c93727
2017-06-05 14:03:34 +08:00
Masayuki Nakano d3789d2d6b Bug 1369419 GetMessage() and PeekMessage() shouldn't be used directly as far as possible r=jimm
In TSF mode, application should retrieve messages with ITfMessagePump::GetMessage() or ITfMessagePump::PeekMessage() since TSF/TIP may handle the message before or after the host application handles it.

This patch rewrites the API users with WinUtils::(Get|Peek)Message() which use ITfMessagePump if it's available.

MozReview-Commit-ID: LwHIgp7SxLH

--HG--
extra : rebase_source : aa5750af9812f9b107c29546cbee6f9eede6ebfa
2017-06-02 12:02:35 +09:00
JW Wang 24a19f81e0 Bug 1370453 - fix potential race condition in ThenCommand<>::Track(). r=gerald
http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/xpcom/threads/MozPromise.h#953-958

MozPromiseRequestHolder is not thread-safe and it is possible for
mReceiver->ThenInternal() to trigger resolve/reject callbacks before
aRequestHolder.Track() is run. We should call aRequestHolder.Track()
before mReceiver->ThenInternal() to avoid the race condition.

MozReview-Commit-ID: K2R09m9UFBF

--HG--
extra : rebase_source : d656498e74d470fdbb82e7525d82af5fb3100735
2017-06-06 14:19:59 +08:00
Phil Ringnalda 5046ec0134 Merge m-c to m-i
MozReview-Commit-ID: 5k3Ip7tGRsC
2017-06-20 21:49:33 -07:00
Bill McCloskey fb8e8e334c Bug 1372405 - Remove NewRunnable functions that lack a name param (r=froydnj)
MozReview-Commit-ID: vGCnkBey03
2017-06-20 21:44:11 -07:00
Bill McCloskey 8c169acdd7 Bug 1372405 - Delete default Runnable ctor so name must be provided (r=froydnj)
MozReview-Commit-ID: 9L4UoBJWzQ3
2017-06-20 21:44:11 -07:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Bill McCloskey 3c1581f160 Bug 1372405 - Change SchedulerGroup::GetName so it doesn't delegate to mozilla::Runnable (r=froydnj)
Delegating to mozilla::Runnable caused us to return the wrong value once
SchedulerGroup started passing a non-empty name to the Runnable constructor.

MozReview-Commit-ID: 2zMlpiMnHwv
2017-06-20 21:44:11 -07:00
JW Wang 225cfa5af7 Bug 1367679. P4 - specialize the type of mCompletionPromise according to whether chaining is supported. r=gerald
MozReview-Commit-ID: 8dPXiGl5njE

--HG--
extra : rebase_source : f38a5ddfcf9789d623e2de7776ae4e8a33448225
extra : intermediate-source : d3447a672312867335e5e7a5ee320b34f7f91ead
extra : source : ec5fa27b3c4f65acc7719ffaa9931bd4a5476a47
2017-06-02 10:16:31 +08:00
JW Wang 6b6056f02f Bug 1367679. P3 - pass mCompletionPromise to InvokeCallbackMethod(). r=gerald
This reduces duplicate code by handling promise chaining in one place.

MozReview-Commit-ID: 474T5hvf9oM

--HG--
extra : rebase_source : b8de5bad5597234654d476b93c0c89abc5215073
extra : intermediate-source : b0f3d3fef28646c31c87acfbfbf36ec9329e7a6c
extra : source : 89aab3206558922271aff1d611f029aed3910acf
2017-05-31 17:28:09 +08:00
JW Wang 2bc689b541 Bug 1367679. P2 - overload InvokeCallbackMethod() according to whether promise-chaining is supported. r=gerald
This patch fixes InvokeCallbackMethod() which should return null
if promise-chaining is not supported.

Before this patch, it could return non-null if one of the resolve/reject callbacks
returns a MozPromise while the other not.

MozReview-Commit-ID: 7YKNvRKEHQx

--HG--
extra : rebase_source : 6429d9eef35efa0128e8b5967097850e6f4a4325
extra : intermediate-source : 6f73de7d2d5fb01be19fdf7d7037b506425eab18
extra : source : a1849e24b09b0b4e986ffaef14d2602541c1c6e8
2017-05-31 17:08:08 +08:00
JW Wang b5d3112f74 Bug 1367679. P1 - refactor InvokeCallbackMethod() to deal with one concern at a time. r=gerald
InvokeMethod() handles optional arguments.
InvokeCallbackMethod() handles optional return value.

MozReview-Commit-ID: AyT6TEKRqbs

--HG--
extra : rebase_source : 9327dfe75f4cb0a23925aaa7dd939b8a2ae1a95d
extra : intermediate-source : cc1df19154f7371bd6ab98ef490e1ad10c3c0ea9
extra : source : 719d64b06a0e9a345f402b8c721d08ff511a5c1b
2017-05-26 00:12:29 +08:00
Carsten "Tomcat" Book 972b7a5149 merge mozilla-inbound to mozilla-central a=merge 2017-06-01 13:50:56 +02:00
Phil Ringnalda 8b48aeb2ba Merge m-c to a CLOSED TREE m-i
MozReview-Commit-ID: BrsSHyBv1nf
2017-05-31 23:41:56 -07:00
Ehsan Akhgari fb6d29cdc3 Backout bug 1368286 because of event processing regressions with nested event loops on OSX a=RyanVM
Landing on a CLOSED TREE
2017-05-31 22:47:47 -04:00
Ben Kelly 3c709a6f61 Bug 1363829 P15 Expose nsITimer::GetAllowedEarlyFiringMicroseconds(). r=froydnj 2017-05-31 17:13:20 -07:00
Ben Kelly be1903d4a8 Bug 1363829 P12 Expose nsITimer::InitHighResolutionWithCallback() method. r=froydnj 2017-05-31 17:13:19 -07:00
JW Wang 99328fb386 Bug 1368382. P4 - move mCompletionPromise down the class hierarchy so it can store a different promise type. r=gerald
MozReview-Commit-ID: 4beSwBzN8b3

--HG--
extra : rebase_source : 109738143300a47525b8e1bb4d0a5df3aa0f956c
extra : intermediate-source : b979cb04a83f427baa8b0c3d27a98a29baa45a24
extra : source : 4fb388fafec2e572e5755c8ea8d0420a819a5909
2017-05-25 17:35:47 +08:00
JW Wang ec61811621 Bug 1368382. P3 - remove 2 overloads of Then() using variadic template. r=gerald
MozReview-Commit-ID: 9KzYGnrFoQN

--HG--
extra : rebase_source : a80bf6107950dec868d314c0c4426b46439b7969
extra : source : e8c1b29f65f594d7a32ce9557e2c1c915f68373c
2017-05-31 16:10:17 +08:00
JW Wang 138c302d05 Bug 1368382. P2 - let ThenCommand reference the sub-type of ThenValueBase. r=gerald
Since we will store mCompletionPromise in the sub-class of ThenValueBase,
ThenCommand needs to reference the sub-type in order to access mCompletionPromise.

MozReview-Commit-ID: BUi7jElOhP7

--HG--
extra : rebase_source : e94c7da8488bb51e543740149925c4cb6514ad54
extra : source : 21dc7e0202dcc64a781c1d92d4d1b7988b5d37a2
2017-05-31 15:23:43 +08:00
JW Wang 8d1189611e Bug 1368382. P1 - rename and make MethodThenValue/FunctionValue specializations of ThenValue<>. r=gerald
This allows us to remove 2 overloads of MozPromise::Then() using variadic template.

MozReview-Commit-ID: 5LHwDhIhh8e

--HG--
extra : rebase_source : 9b84a92858736b389bd2e60aa7392bfec526ab72
extra : source : 3cdd047583693a7abf479dd75620d1c7d07da70d
2017-05-31 07:44:53 +08:00
Bevis Tseng 024ff96b5b Bug 1363318 - Part 2: Label FetchBody. r=baku 2017-05-16 18:12:24 +08:00
Carsten "Tomcat" Book b318c7dca7 merge mozilla-inbound to mozilla-central + UPGRADE_NSS_RELEASE a=merge
--HG--
rename : toolkit/components/extensions/test/xpcshell/xpcshell.ini => toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
extra : amend_source : 458fd54fe8070ca3034ac441267ff7025adb5251
2017-05-30 11:37:46 +02:00
Ehsan Akhgari 632ef747e7 Bug 1368286 - Take the idle queue into account in nsThread::HasPendingEvents(); r=smaug 2017-05-29 14:34:34 -04:00
Olli Pettay 5e7b0d0105 Bug 1368358 - ThrottledEventQueue::Inner::IsOnCurrentThread should work similarly to other IsOnCurrentThread implementations, r=bkelly
--HG--
extra : rebase_source : 976c25959938bb6572c95ff6120552b9ebad65d7
2017-05-29 17:04:36 +03:00
JW Wang 80a1b6063a Bug 1367674. P2 - remove unused code. r=gerald
MozReview-Commit-ID: 5OHWP5rpiff

--HG--
extra : rebase_source : 723d07adf131912a73b81738b0b43e9d67673c6c
2017-05-25 15:42:35 +08:00
JW Wang 6f82ddffdf Bug 1367674. P1 - add templates to deal with CV and argument number correctly. r=gerald
MozReview-Commit-ID: 5qeSBDny6uc

--HG--
extra : rebase_source : 92530c9efd7cdaaf50fba56d423532546059f37e
2017-05-25 15:41:01 +08:00
Manish Goregaokar e104a8487b Bug 1367619 - Use RWLock when accessing font prefs service off main thread; r=heycam
MozReview-Commit-ID: Dxdq6Etbwxa

--HG--
extra : rebase_source : ec9f847c7dce6a101db6a3d157395f5b73d87ba1
2017-05-25 15:04:13 -07:00
Olli Pettay 2c06db876d Bug 1311425, review comment fix to ensure low priority timers aren't taken into account when calling NS_GetTimerDeadlineHintOnCurrentThread, r=smaug 2017-05-26 09:13:39 -04:00
Andreas Farre 892408079a Bug 1311425 - Add pref for how far into the timer queue, r=smaug,f=froydnj
--HG--
extra : rebase_source : 170404bed646efffa71f1e5b0970ec69f6dc4ce5
2017-05-24 21:14:29 -04:00
Andreas Farre 8e2322bcce Bug 1311425 - Make idle callbacks aware of nsITimers, r=froydnj
--HG--
extra : rebase_source : 3baa3054c1ca08783fd0d04dab91d3f97d2e65f1
2017-05-24 21:12:55 -04:00
Andreas Farre 0833711613 Bug 1311425 - Prepare for handling several sources of idleness, r=smaug
--HG--
extra : rebase_source : 7f771167ae460a50715f23c587eea10d5fe7e815
2017-05-24 21:11:12 -04:00
Nicholas Nethercote 0840bb61c6 Bug 1366650 (part 1) - Move PseudoStack into SpiderMonkey. r=mstange,shu.
This includes renaming its fields to match SpiderMonkey naming conventions
instead of Gecko naming conventions.

This patch is just about moving the code. The next patch will change
SpiderMonkey to actually use PseudoStack directly.

--HG--
extra : rebase_source : 27e77ddf950201eb6bdba60003218056442cf7ab
2017-05-26 09:37:28 +10:00
Kan-Ru Chen c54925d495 Bug 1365827 - Make MozPromise::Private::{Resolve,Reject} no-op when it's not pending. r=jwwang
MozReview-Commit-ID: 5HbUS9yA29K

--HG--
extra : rebase_source : ffbf53148e486757e5b36bdc0510bacce424a5e5
2017-05-24 13:46:19 -04:00
Gabriele Svelto 69f2bbaf90 Bug 1366711 - Make it possible to hide applications launched with nsIProcess; r=bsmedberg
MozReview-Commit-ID: K3vadzPg8SR

--HG--
extra : rebase_source : 9803bdca46c7dceb9bae0eefa4972369c7b36202
2017-05-22 10:23:00 +02:00
Olli Pettay bc787a0ec7 Bug 1358476, add support for timeout when doing idle dispatch, p=farre,smaug, r=nfroyd
--HG--
extra : rebase_source : 8561bd1e1aad04be8b9d3efa7b43d4833a4703bf
2017-05-24 17:34:50 -04:00
Ehsan Akhgari b1a6df0904 Backout the experimental patch for bug 1366156 because it didn't help 2017-05-24 09:46:39 -04:00
Andreas Farre 9b389ab049 Bug 1353206 - Expose nsIThread::idleDispatch to script. r=froydnj 2017-05-24 12:16:04 +02:00
Bill McCloskey 226f6b9185 Bug 1366869 - Make DISPATCH_NORMAL be the default flags argument for nsIEventTarget::Dispatch (r=froydnj)
MozReview-Commit-ID: 5DVcIaMHH95
2017-05-23 12:05:43 -07:00
Michael Layzell 590b8f81b4 Bug 1363883 - Share memory maps between BHR native stacks, dr=bsmedberg, r=froydnj
MozReview-Commit-ID: IQ1fMXUD0ch
2017-05-23 13:41:52 -04:00
Andreas Farre 5a1916b791 Bug 1366750 - Rename nsIIncrementalRunnable to nsIIdleRunnable. r=smaug
The name nsIIdleRunnable makes more sense, since its main use is in
nsIThread::idleDispatch.

MozReview-Commit-ID: H6qchxKnt7a
2017-05-23 13:24:25 +02:00
Nathan Froyd d0e620966f Bug 1363172 - add mozilla::RWLock; r=erahm
This sort of lock is mostly useful in the context of Stylo right now,
but perhaps there are other applications waiting to be written.
2017-05-22 21:26:26 -04:00
Nicholas Nethercote d1e495344b Bug 1365854 - Remove FRAME_LABEL_COPY. r=mstange,shu.
ProfileEntry has |string|, which can be static or dynamic, and |dynamicString|.
If |string| is dynamic, the FRAME_LABEL_COPY flag must be set, and it will be
copied into profiler output.

But there is only one place that uses dynamic |string| values, in SpiderMonkey.
And that place doesn't use |dynamicString|. So this patch changes that place to
use an empty |string| and put the old dynamic |string| value in
|dynamicString|. This in turn removes the need for FRAME_LABEL_COPY.

One minor wrinkle is that when |dynamicString| is used the old code put a space
between |string| and |dynamicString|. The new code omits the space if |string|
is empty.

The patch also renames ProfileEntry::string as ProfileEntry::label_, which
better matches how it's used, and ProfileEntry::dynamicString as
ProfileEntry::dynamicString_ so the getter can be renamed dynamicString().
2017-05-18 17:17:46 +10:00
Bill McCloskey b71d032b99 Bug 1363877 - Label IPC shmem messages as SystemGroup (r=dvander)
MozReview-Commit-ID: 3I5ny0wxVHI
2017-05-19 16:38:12 -07:00
Bill McCloskey 24b1d128db Bug 1363474 - Add a method to ask whether it's safe to run code related to a given SchedulerGroup (r=froydnj)
MozReview-Commit-ID: F8uZUTfUM9v
2017-05-19 14:31:52 -07:00
Bill McCloskey 2f4cd5e241 Revert "Bug 1363474 - Add a method to ask whether it's safe to run code related to a given SchedulerGroup (r=froydnj)"
This reverts commit 51714e98c2d248c02b326aeea64f3af0cbdecd50.
2017-05-19 14:24:45 -07:00
Bill McCloskey f63847577a Bug 1363474 - Add a method to ask whether it's safe to run code related to a given SchedulerGroup (r=froydnj)
MozReview-Commit-ID: F8uZUTfUM9v
2017-05-19 13:59:24 -07:00
Ehsan Akhgari f5567643a3 Bug 1366156 - Temporarily disable the collection of content js delay event telemetry probes to investigate whether they are the cause of child process INPUT_EVENT_RESPONSE_MS regressions; r=farre 2017-05-19 09:46:30 -04:00
Iris Hsiao 02cae69058 Backed out 4 changesets (bug 1357829) for build bustage in xpcshell\selftest.py on windows 8 x64 opt. a=backout
Backed out changeset 8ea202bb1103 (bug 1357829)
Backed out changeset cebe4d7abeda (bug 1357829)
Backed out changeset 378d473c9619 (bug 1357829)
Backed out changeset 86ebe868d443 (bug 1357829)
2017-05-19 11:27:38 +08:00
Michael Layzell 3a8384acc0 Bug 1357829 - Part 2: Use profiler_suspend_sample_thread in the background hang monitor, r=froydnj
This patch uses the profiler_suspend_sample_thread method which was added in
part 1.

With this patch, we no longer manually run code to pause the target thread,
instead using the profiler's provided code to do so. In addition, we no longer
manually walk the stack to collect native stack frames, instead relying on the
profiler's cross-platform stack walking logic.

This helps remove some of the code from ThreadStackHelper which was redundant
with the profiler. Much of the pseudostack code in ThreadStackHelper is also
redundant, and should hopefully be eliminated in a follow-up.

MozReview-Commit-ID: 4RjLHt6inH9
2017-05-18 13:56:20 -04:00
Michael Layzell 04032b2cd0 Bug 1365749 - Bump kMaximumNativeHangStacks back to 300, and increase the number of native frames we are collecting, r=ehsan
MozReview-Commit-ID: FahsOqeXeLL
2017-05-17 17:27:12 -04:00
Bill McCloskey 8adfa773bb Revert "Bug 1363877 - Label IPC shmem messages as SystemGroup (r=dvander)" for valgrind failures
This reverts commit 1f7a7e259501b47a014959049e2ed069fe2fd9b8.
2017-05-17 12:58:35 -07:00
Bill McCloskey 71bfb5a04b Bug 1351021 - Compute mean time between unlabeled (r=froydnj,data-r=bsmedberg)
Accumulates the time in between running unlabeled runnables in a histogram. This
measurement will be useful to see how much of a win the cooperative scheduler
will be, assuming we label no more runnables.

MozReview-Commit-ID: 9lgoGJcXLP9
2017-05-17 11:47:40 -07:00
Bill McCloskey 68a155951c Bug 1351021 - Make SchedulerGroup::Runnable QIable (r=froydnj)
The patch allows us to tell whether a runnable is labeled using QI.

MozReview-Commit-ID: KkcCSUdWMBr
2017-05-17 11:47:40 -07:00
Bill McCloskey 2f2e996bf5 Bug 1363877 - Label IPC shmem messages as SystemGroup (r=dvander)
MozReview-Commit-ID: 3I5ny0wxVHI
2017-05-17 11:47:40 -07:00
Nathan Froyd c1d1748428 Bug 1359490 - add an event loop spinning abstraction function; r=gerald
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
2017-05-15 09:34:19 -04:00
Wes Kocher f1c0f35ea6 Merge inbound to m-c a=merge
MozReview-Commit-ID: HCapLqbD816
2017-05-11 17:30:41 -07:00
Wes Kocher d23a68d914 Merge autoland to central, a=merge
MozReview-Commit-ID: 4Po5DGPupTx
2017-05-11 16:43:57 -07:00
Ehsan Akhgari cc2e0b06df Bug 1364243 - Bring down the number of native stacks submitted through BHR temporarily in the hopes of not blowing up the telemetry ping sizes on Nightly for Windows x86; r=mystor a=kwierso 2017-05-11 19:00:22 -04:00
JW Wang 394ed3f08b Bug 1363676. P1 - use Variant as the internal storage of ResolveOrRejectValue. r=gerald
MozReview-Commit-ID: 4B3M3hvfvyz

--HG--
extra : rebase_source : 245add2750849ccb4c5aa0f12bb03ba0679c6c1f
extra : intermediate-source : 5e8c6df9ed9b3c66162a85f2ae101fa77eb3bfe0
extra : source : 4269edd719b617c6c3d9be97b77e91980650c934
2017-05-09 18:24:18 +08:00
JW Wang d45ddf9078 Bug 1362910. P1 - enable move when IsExclusive is true. r=gerald
When IsExclusive is true, there is at most only one consumer.
So it is safe to move the ResolveOrRejectValue stored in the promise.

MozReview-Commit-ID: ED9fFr7TkvN

--HG--
extra : rebase_source : 57c6732279a2c76fc21c3e7bad17d70f9cd0834a
extra : intermediate-source : c55836b6708150e88c2ca3a804c2cf2fbcf79990
extra : source : 3285b59746e994283e101cc10267d3a642c96ab3
2017-05-11 01:30:12 +08:00
Byron Campen [:bwc] 85231bad6e Bug 1361100: Perform all timer init after removal from TimerThread. r=froydnj 2017-05-01 14:50:37 -05:00
Carsten "Tomcat" Book d66b9f27d5 merge mozilla-inbound to mozilla-central a=merge 2017-05-10 15:07:28 +02:00
Bill McCloskey c197e07ff2 Bug 1363560 - Name more runnables (r=mccr8)
MozReview-Commit-ID: 3hxZDA4JlTV
2017-05-09 21:53:25 -07:00
Bill McCloskey 64eae5b86d Bug 1361561 - Add GetCurrentVirtualThread function (r=froydnj)
This change adds some functions that should be used instead of PR_GetCurrentThread. They both return a PRThread. GetCurrentPhysicalThread does exactly the same thing as PR_GetCurrentThread, but it makes it clearer what you're getting when there are cooperatively scheduled threads running.

GetCurrentVirtualThread returns the same value for all threads in a cooperative thread pool. The actual value it returns is somewhat immaterial.

MozReview-Commit-ID: 4lFwsF2NuzC
2017-05-09 21:53:23 -07:00
JW Wang 4f8f4d86e6 Bug 1362912. P1 - disallow promise chaining when any of the Then callbacks doesn't return a promise. r=gerald
A template won't be instatiated until used. We make it a compile error
to call Then() on ThenCommand<false> to disallow promise chaining.

MozReview-Commit-ID: BUCFgfX4FTJ

--HG--
extra : rebase_source : 0b46b9d10a9b7dec3f15ad4596d9726365f6f859
extra : source : 5676128a7a3ee68bf9eee01bbdf8b983117d5655
2017-05-09 23:11:42 +08:00
Byron Campen [:bwc] 2394603d23 Bug 1361098: Simplify TimerThread::Init some. r=froydnj
--HG--
extra : rebase_source : dad786e4130964e48aef9812773e7cf4840ba46d
extra : amend_source : f6d7b3421c036bc94a2067439244b78dc75ccb68
2017-05-01 13:42:11 -05:00
Carsten "Tomcat" Book fdc689ba16 merge mozilla-inbound to mozilla-central a=merge 2017-05-05 15:17:26 +02:00
Andreas Farre 7cd708c02f Bug 1322184 - Measure time spent in content JS that causes delay in paint. r=billm, data-r=bsmedberg
MozReview-Commit-ID: Iz31CKSnDdc

--HG--
extra : rebase_source : e0db2419ee2ef868d2f4d1b47d45547e55bd2036
2017-05-02 08:10:00 -04:00
JW Wang 47f3443d87 Bug 1361263 - allow InvokeAsync() to accept a member function which is pass-by-reference. r=gerald
StoreCopyPassByRRef<> ensures a copy is stored in the runnable.
We don't have to worry about the concern of bug 1300476.

MozReview-Commit-ID: DHqlzlVLBFV

--HG--
extra : rebase_source : 77f2175611aa6fad88207a771de75fd28fd46f21
extra : source : 429c62928fd43185da45c905a150cfbe84cb3cf7
2017-04-30 15:37:19 +08:00
Michael Layzell 25ff5420dd Bug 1358619 - Fetch the stack and native stack within the same pause of the target thread, r=froydnj 2017-05-01 13:40:37 -04:00
Michael Layzell 5f77ef972f Bug 1346415 - Collect native stacks at the same time as pseudostacks on nightly, r=mconley 2017-05-01 13:40:37 -04:00
Michael Layzell 58464c1919 Bug 1346415 - Use FramePointerStackWalk for less deadlocking when stackwalking on x86, r=njn
MozReview-Commit-ID: CAHarvGSuTY
2017-05-01 13:40:37 -04:00
Nicholas Nethercote 9471adc672 Bug 1359000 (part 4) - De-inline profiler_call_{enter,exit}. r=mstange.
This possibly incurs an extra function call (depends on exactly how much inling
the compiler does). But it helps enormously with subsequent refactorings,
because PseudoStack (and related types) don't need to be visible in
GeckoProfiler.h, which is exported outside the profiler.

--HG--
extra : rebase_source : f2dc5952d7444dfe12e627e86e6d37632b283107
2017-04-27 07:36:11 +10:00
JW Wang 0941224ebb Bug 1359309. P2 - dump the name of the TaskQueue when Dispatch() fails. r=jya
MozReview-Commit-ID: AqGviaekwRa

--HG--
extra : rebase_source : 03249fa43e7fde436d1e56ef21a9a5df66e941be
extra : intermediate-source : f50b5740178e39509b85b4cf216aca0ab45de821
extra : source : 86da182d4b06bd164ead844b164e602b58b93ffa
2017-04-25 15:08:23 +08:00
JW Wang aab9f27e0f Bug 1359309. P1 - give mozilla::TaskQueue a name which will be useful in debugging Dispatch() failures. r=jya
MozReview-Commit-ID: 5FAVNo32fl7

--HG--
extra : rebase_source : 761fca752429d95e97be699976283baa35c64abb
extra : intermediate-source : 83282a7a5adbe7046212da85f9d16e39faa4bd5c
extra : source : 924af3ea0aa86888fd2745020be7900e6eb614f0
2017-04-25 14:57:55 +08:00
Wes Kocher c90904f9bf Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 9HQViJrDT6S
2017-04-26 17:30:31 -07:00