Commit Graph

16282 Commits

Author SHA1 Message Date
Ehsan Akhgari
cb3e227493 Bug 1371279 - Try to use reserved stack space instead of heap allocation in nsLocalFile::GetNativeTarget(); r=froydnj 2017-06-09 01:14:16 -04:00
Michael Layzell
e8c6bd15df Bug 1368524 - Add a telemetry probe for how long we spend processing NotifyObservers callbacks, dr=bsmedberg, r=ehsan
MozReview-Commit-ID: KWypjvFscVu
2017-06-08 13:58:31 -04:00
Carsten "Tomcat" Book
247a47fac9 Merge mozilla-central to mozilla-inbound 2017-06-08 15:16:36 +02:00
Carsten "Tomcat" Book
b9d94b34d4 merge mozilla-inbound to mozilla-central a=merge 2017-06-08 14:43:56 +02:00
Mats Palmgren
c4730f96bb Bug 1371061 - Optimize nsBaseHashtable::GetOrInsert() to only do a single hashtable lookup. r=froydnj
MozReview-Commit-ID: 6muOorLplG1
2017-06-08 12:48:32 +02:00
Stephen A Pohl
630acd56de Bug 1364984 - Ensure that our sandbox and tests can handle temp directory paths using symlinks on macOS. r=haik,aswan 2017-06-07 20:40:58 -04:00
Colin Dean
0f028d9bc9 Bug 1364984 - use non-deprecated API for finding the temporary directory on OS X; r=mstange
FSFindFolder is deprecated as of 10.9 and apparently continues to
work...except for the case of finding the temporary directory when the
user's home directory lives on an NFS mount (!).  Using
NSTemporaryDirectory does The Right Thing here, so let's use that instead.
2017-06-07 20:40:50 -04: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
Mats Palmgren
6467c38383 Bug 1370632 - Move LookupRemoveIf() to nsBaseHashtable instead so that it can be used on more hashtables types. r=froydnj
MozReview-Commit-ID: 9kQSytPWok5
2017-06-07 15:22:41 +02:00
Mats Palmgren
0630f5b2bf Bug 1367207 part 3 - Introduce nsClassHashtable::LookupRemoveIf() for consumers that wants to do a Get() then inspect/modify the value then, maybe, Remove() the entry. This is to avoid a second hashtable lookup for the Remove(). r=froydnj
Also, make RemoveAndForget() use RemoveEntry(), not Remove(), to remove
the entry to avoid a second hashtable lookup.

MozReview-Commit-ID: Bj5Heo8YLFJ
2017-06-07 15:22:41 +02:00
Nathan Froyd
cee39716e5 Bug 1370606 - fix fallible nsRefPtrHashtable::Put to really be fallible; r=erahm
Calling the infallible PutEntry effectively makes this function
infallible, despite Put taking a fallible_t argument.
2017-06-06 21:06:17 -04:00
Nathan Froyd
cb5ef308b6 Bug 1370593 - avoid redundant lookups in nsRefPtrHashtable::Remove; r=mats
We already have a handle to the entry in the hashtable, we can remove
that directly, rather than implicitly looking up the entry to remove in
Remove().
2017-06-06 21:06:17 -04: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
Mike Hommey
e9c25fa403 Bug 1369622 - Restore static asserts for lack of arguments on some macros. r=froydnj
Bug 1368932 removed MOZ_STATIC_ASSERT_VALID_ARG_COUNT because it didn't
actually work for large numbers of arguments. But it was kind of useful
for macros that expand to something broken when they are given no
variadic argument at all.

Now that we have a macro that doesn't require tricks to count empty
arguments lists, however, we can use straightforward static_asserts
instead of a generic macro, which has the side effect of providing more
context in the error message.

--HG--
extra : rebase_source : 223f85c2c5cc7b3fa8c584b70bb084784fb5764a
2017-06-02 15:07:58 +09:00
Mike Hommey
8914ace4ce Bug 1369622 - Use MOZ_ARG_COUNT instead of MOZ_PASTE_PREFIX_AND_ARG_COUNT. r=froydnj
In a couple places, MOZ_PASTE_PREFIX_AND_ARG_COUNT is used to only count
the number of arguments, we can now use MOZ_ARG_COUNT directly for that.

--HG--
extra : rebase_source : 1064e4cc231863dc4aff83ee6bc90d318b4be418
2017-06-02 15:06:34 +09: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
a2e96d0054 Backed out changeset 8adc00c59534 (bug 1369712) for crashes in xpcshell tests on Linux and OS X, e.g. in test_captive_portal_not_found.js @ JS::HeapObjectPostBarrier. r=backout 2017-06-06 15:30:02 +02:00
Jon Coppeard
4474d8cea0 Bug 1369712 - Fix removing the gray roots tracer r=mccr8 2017-06-06 11:25:58 +01: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
Sebastian Hengst
5e4755df68 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IdRgoZ9hiXq
2017-06-03 20:15:27 +02:00
Wes Kocher
269f7e9f5c Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9wTctDOsPpO
2017-06-02 17:31:31 -07:00
Randell Jesup
bafb1e730e Bug 1344223 error-check mkstemp() r=froyd
MozReview-Commit-ID: 1z3cQXioTXP
2017-06-02 15:53:40 -04: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
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
Mike Hommey
ff1697d6f2 Bug 1365419 - Allow to apply manifest entries for all non-(Darwin,Windows,Android) OSes. r=bsmedberg
Manifest entries can contain flags, one of which allows to match on the
os running Gecko. The match is performed against the value returned by
nsIXULRuntime.getOS, which itself comes from the build-system's
OS_TARGET.

In practice, this means that things like os=WINNT, os=Darwin,
os=Android, os=Linux are valid filters, but the latter is too specific,
and most of the time, one would want something that is "any OS but
WINNT, Darwin, Android", which can't be expressed with manifest entry
flags (there is no "and" for them, only "or").

For convenience, we add the keyword "LikeUnix", which has that meaning.

--HG--
extra : rebase_source : faf3986d2a4361d12a512752e15e81270be224ef
2017-05-26 08:56:18 +09:00
Wes Kocher
135f065d54 Merge m-c to autoland, a=merge
MozReview-Commit-ID: GZPNfYTsjn1
2017-06-01 18:43:48 -07:00
Wes Kocher
9782406dd8 Backed out 4 changesets (bug 1365419) for android mochitest failures in test_bug583533.html a=backout
Backed out changeset d82aa6aec2c1 (bug 1365419)
Backed out changeset 9aafdd1ca0bd (bug 1365419)
Backed out changeset 261eecf8497f (bug 1365419)
Backed out changeset 1d9b50fadc05 (bug 1365419)

MozReview-Commit-ID: HkhXf1Dkkbk
2017-06-01 18:39:21 -07:00
Mike Hommey
6a0f9240a2 Bug 1365419 - Allow to apply manifest entries for all non-(Darwin,Windows,Android) OSes. r=bsmedberg
Manifest entries can contain flags, one of which allows to match on the
os running Gecko. The match is performed against the value returned by
nsIXULRuntime.getOS, which itself comes from the build-system's
OS_TARGET.

In practice, this means that things like os=WINNT, os=Darwin,
os=Android, os=Linux are valid filters, but the latter is too specific,
and most of the time, one would want something that is "any OS but
WINNT, Darwin, Android", which can't be expressed with manifest entry
flags (there is no "and" for them, only "or").

For convenience, we add the keyword "LikeUnix", which has that meaning.

--HG--
extra : rebase_source : ce2549fab96cb1df3f984e43cb08413cad49479e
2017-05-26 08:56:18 +09:00
Bryce Van Dyk
99d1ede409 Bug 1272371 - Update multiplexed input stream seek behaviour. r=froydnj
This patch is originally from :baku and updates the seek behaviour of
nsMulitplexInputStream. This fixes an issue with absolute seeking where if a
seek is performed and the correct offset reached, the members of the multiplex
stream were not updated to reflect this.

MozReview-Commit-ID: 7lEvuXxzYkI

--HG--
extra : rebase_source : d86a7ce0fc26abd3c9a60810bd7f7f6346e7a5b0
2017-05-25 13:38:01 +12:00
Bryce Van Dyk
5d382edc2b Bug 1272371 - Add gtest to cover nsMultiplexInputStream set seek. r=froydnj
MozReview-Commit-ID: b3kTP3rerq

--HG--
extra : rebase_source : 3c760baa52a409eaf371d966fdaa293d3d53f81a
2017-05-30 11:27:18 +12:00
Daniel Holbert
4564af3454 Bug 1368326: Don't bother calling Clear() in destructor for empty nsTArrays. r=froydnj
MozReview-Commit-ID: 7mi2Os52JfJ

--HG--
extra : rebase_source : 4c7296fd84509f71b680a55f513574285e754481
2017-06-01 14:38:13 -07: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