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

16267 Коммитов

Автор SHA1 Сообщение Дата
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
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
L. David Baron 07c2f2dc49 Bug 1352889 - Ensure that PLDHashTable's second hash doesn't have padding with 0 bits for tables with capacity larger than 2^16. r=njn
PLDHashTable takes the result of the hash function and multiplies it by
kGoldenRatio to ensure that it has a good distribution of bits across
the 32-bit hash value, and then zeroes out the low bit so that it can be
used for the collision flag.  This result is called hash0.  From hash0
it computes two different numbers used to find entries in the table
storage:  hash1 is used to find an initial position in the table to
begin searching for an entry; hash2 is then used to repeatedly offset
that position (mod the size of the table) to build a chain of positions
to search.

In a table with capacity 2^c entries, hash1 is simply the upper c bits
of hash0.  This patch does not change this.

Prior to this patch, hash2 was the c bits below hash1, padded at the low
end with zeroes when c > 16.  (Note that bug 927705, changeset
1a02bec165e16f370cace3da21bb2b377a0a7242, increased the maximum capacity
from 2^23 to 2^26 since 2^23 was sometimes insufficient!)  This manner
of computing hash2 is problematic because it increases the risk of long
chains for very large tables, since there is less variation in the hash2
result due to the zero padding.

So this patch changes the hash2 computation by using the low bits of
hash0 instead of shifting it around, thus avoiding 0 bits in parts of
the hash2 value that are significant.

Note that this changes what hash2 is in all cases except when the table
capacity is exactly 2^16, so it does change our hashing characteristics.
For tables with capacity less than 2^16, it should be using a different
second hash, but with the same amount of random-ish data.  For tables
with capacity greater than 2^16, it should be using more random-ish
data.

Note that this patch depends on the patch for bug 1353458 in order to
avoid causing test failures.

MozReview-Commit-ID: JvnxAMBY711

--HG--
extra : transplant_source : 2%D2%C2%CE%E1%92%C8%F8H%D7%15%A4%86%5B%3Ac%0B%08%3DA
2017-05-31 13:44:02 -07:00
L. David Baron f22aab91c2 Bug 1352888 - Don't set the collision flag when adding to PLDHashTable if we've already found the entry we're going to add. r=njn
PLDHashTable's entry store has two types of unoccupied entries:  free
entries and removed entries.  The search of a chain of entries
(determined by the hash value) in the entry store to search for an entry
can stop at free entries, but it continues across removed entries,
because removed entries are entries that may have been skipped over when
we were adding the value we're searching for to the hash, but have since
been removed.  For live entries, we also maintain this distinction by
using one bit of storage for a collision flag, which notes that if the
hashtable entry is removed, its place in the entry store must become a
removed entry rather than a free entry.

When we add a new entry to the table, Add's semantics require that we
return an existing entry if there is one, and only create a new entry if
no existing entry exists.  (Bug 1352198 suggests the possibility of a
faster alternative Add API where the caller guarantees that the key is
not already in the hashtable.)  When we search for the existing entry,
we must thus continue the search across removed entries, even though we
record the first removed entry found to return if the search for an
existing entry fails.

The existing code adds the collision flag through the entire table
search during an Add.  This patch changes that behavior so that we only
add the collision flag prior to finding the first removed entry.  Adding
it after we find the first removed entry is unnecessary, since we are
not making that entry part of a path to a new entry.  If it is part of a
path to an existing entry, it will already have the collision flag set.

This patch effectively puts an if (!firstRemoved) around the else branch
of the if (MOZ_UNLIKELY(EntryIsRemoved(entry))), and then refactors that
condition outwards since it is now around the contents of both the if
and else branches.

MozReview-Commit-ID: CsXnMYttHVy

--HG--
extra : transplant_source : %80%9E%83%EC%CCY%B4%B0%86%86%18%99%B6U%21o%5D%29%AD%04
2017-05-31 13:44:02 -07:00
Ryan VanderMeulen b9fe830aa0 Merge inbound to m-c. a=merge
CLOSED TREE
2017-05-31 14:32:55 -04:00
Bevis Tseng 024ff96b5b Bug 1363318 - Part 2: Label FetchBody. r=baku 2017-05-16 18:12:24 +08:00
Carl Corcoran 3ec4012254 Bug 1367899: Add handling for call reg opcode; r=dmajor
MozReview-Commit-ID: 2ncXsGf2H95

--HG--
extra : rebase_source : 70419541bf28844af4ce6348e343691d073556c3
2017-05-25 19:39:43 +02:00
Carl Corcoran f203b4e69b Bug 1367899: Add handling for test r/m32, r32 and jne rel8 opcodes; r=dmajor
MozReview-Commit-ID: 3Cnx5tYrqMT

--HG--
extra : rebase_source : 723d961913e8d2788dcf3ce9b18aa6dffee4e963
2017-05-26 01:56:07 +02: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