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

16132 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight 36ebb195c2 Bug 1356268 - Fix nsMemoryReporter unified build bustage. r=froydnj
The header uses nsDataHashtable, but not nsTHashtable.

MozReview-Commit-ID: 1wxmqjTyPMS

--HG--
extra : rebase_source : 869a63c52f688e731343fab7ae0b1f3f9eaec5da
2017-04-13 07:26:44 -07:00
Nathan Froyd 2989feb7d7 Bug 1353810 - add a --enable-rust-debug option; r=chmanchester
For people working on Rust code, compiling in debug mode (Cargo's "dev"
profile) is convenient: debug assertions are turned on, optimization is
turned off, and parallel compilation inside of rustc itself can be
used.  These things make the build faster and the debugging experience
more pleasant.

To obtain that currently, one needs to --enable-debug at the Gecko
toplevel, which turns on debug assertions for the entire browser, which
makes things run unreasonably slowly.  So it would be desirable to be
able to turn *off* debug mode for the entirety of the browser, but turn
on debug mode for the Rust code only.

Hence this added switch, --enable-rust-debug, which does what it
suggests and defaults to the value of --enable-debug.  For our own
sanity and because we judge it a non-existent use case, we do not
support --enable-debug --disable-rust-debug.
2017-04-12 21:49:25 -04:00
Michael Layzell 928315324d Bug 1355597 - Support passing empty arrays to MozPromise::All, r=jwwang
MozReview-Commit-ID: Knhm0N9huuo
2017-04-12 12:09:48 -04:00
Petr Sumbera 0e17adee7c Bug 1354510 - Firefox build should recognize Solaris. r=glandium
--HG--
extra : rebase_source : 2bec2709a26a5295e723b0ecc424b0d648715bb7
2017-04-11 00:01:32 -07:00
Andrea Marchesini 7998eae548 Bug 1355369 - gtests for SlicedInputStream and ASyncWait, r=me 2017-04-12 13:49:08 +02:00
Andrea Marchesini 8b8935bd3b Bug 1355369 - SlicedInputStream must implement AsyncWait correctly, r=smaug 2017-04-12 13:49:08 +02:00
Andrea Marchesini 0cd2885406 Bug 1355369 - SlicedInputStream should expose nsIAsyncInputStream interface only when needed, r=smaug 2017-04-12 13:49:08 +02:00
Iris Hsiao d13a81eccb Merge mozilla-central to mozilla-inbound 2017-04-12 11:24:24 +08:00
Florian Queze b5916a37c7 Bug 1355216 - Mark last parameters that are almost always falsy as optional, r=froydnj. 2017-04-12 00:07:30 +02:00
Bill McCloskey 2bb4eb39bf Bug 1350436 - Rename ValidatingDispatcher to SchedulerGroup (r=froydnj)
MozReview-Commit-ID: 1gWB9ZLPQfY
2017-04-10 16:49:39 -07:00
Bill McCloskey 21e75fbf2a Bug 1350436 - Collapse Dispatcher into ValidatingDispatcher (r=froydnj)
MozReview-Commit-ID: DrcElmf4iyn
2017-04-10 16:49:39 -07:00
Ricky Chien 614a5e5e24 Bug 1352699 - Fix mochitest failures r=gasolin
MozReview-Commit-ID: HmlBgPkjxoS

--HG--
extra : rebase_source : 087b99e0a957347e5652924eb5770a4b1500a1fe
2017-04-09 16:55:13 +08:00
Bill McCloskey 172e502215 Revert "Bug 1340719 - Throw an exception if accessing Xray from wrong docgroup (r=bholley)"
This reverts commit ff10f4faedd42f13ed2899cf4ea05c47411aba95.
2017-04-07 14:23:06 -07:00
Jan de Mooij 546f01e711 Bug 1353758 - Move the external string cache into the JS engine and improve it. r=arai,bz
--HG--
extra : rebase_source : 6d57d70a837bbb284a2db889df34b886ae398a3f
2017-04-07 10:40:29 +02:00
Phil Ringnalda 8ff3505864 Merge m-c to a CLOSED TREE m-i 2017-04-06 21:16:43 -07:00
Phil Ringnalda 607ccd57d2 Backed out changeset a50a4f9e972b (bug 1322554) for near-permaorange in Win8 debug updater xpcshell tests 2017-04-06 21:00:26 -07:00
Carsten "Tomcat" Book 207b516e89 merge mozilla-inbound to mozilla-central a=merge 2017-04-06 12:50:50 +02:00
Michael Layzell a6f6b4a390 Bug 1320179 - Part 4: MOZ_OBJDIR->MOZ_TOPOBJDIR and update m-c-changes.patch for protobuf changes, r=fitzgen
MozReview-Commit-ID: EPhkF350sGY
2017-04-06 18:37:31 -04:00
Michael Layzell 981693a30f Bug 1320179 - Part 2: Add the nserror rust crate and generate NS_ERROR codes, r=froydnj
MozReview-Commit-ID: FFU6WfEqev
2017-04-06 18:37:25 -04:00
Michael Layzell 3365a83a2c Bug 1320179 - Part 1: Move nsresult value calculation into a python script, r=froydnj
This patch makes the error codes in nsError.h be generated by a python script.
This gives us the opportunity to add rust code generation in parallel with the
C++ code generation, which will happen in part 2.

This patch also reworks the name calculation in ErrorNames.cpp to use generated
code by the python script.

MozReview-Commit-ID: 5wxbdZwxe7q
2017-04-06 18:36:22 -04:00
Wes Kocher 1f91b9d155 Backed out 4 changesets (bug 1320179) for causing merge conflicts a=backout
Backed out changeset b8aa677f7452 (bug 1320179)
Backed out changeset 9e2f77570128 (bug 1320179)
Backed out changeset 470d8143b350 (bug 1320179)
Backed out changeset ea4f1b3cc7b1 (bug 1320179)
2017-04-06 15:29:24 -07:00
Michael Layzell c33097aeaa Bug 1320179 - Part 4: MOZ_OBJDIR->MOZ_TOPOBJDIR and update m-c-changes.patch for protobuf changes, r=fitzgen
MozReview-Commit-ID: EPhkF350sGY
2017-04-06 17:37:13 -04:00
Michael Layzell df411f4313 Bug 1320179 - Part 2: Add the nserror rust crate and generate NS_ERROR codes, r=froydnj
MozReview-Commit-ID: FFU6WfEqev
2017-04-06 17:22:08 -04:00
Michael Layzell b60e1038c7 Bug 1320179 - Part 1: Move nsresult value calculation into a python script, r=froydnj
This patch makes the error codes in nsError.h be generated by a python script.
This gives us the opportunity to add rust code generation in parallel with the
C++ code generation, which will happen in part 2.

This patch also reworks the name calculation in ErrorNames.cpp to use generated
code by the python script.

MozReview-Commit-ID: 5wxbdZwxe7q
2017-04-06 17:22:00 -04:00
Eric Rahm 807d2c062b Bug 1353544 - Replace usage of PR_BEGIN_MACRO in xpcom. r=froydnj 2017-04-05 18:06:44 -07:00
Carl Corcoran 08fc406af4 Bug 1322554: Interpose kernel32!BaseThreadInitThunk to add verification of thread start addresses; r=dmajor
MozReview-Commit-ID: CvqZ3gXJyvo
2017-03-29 17:07:37 +02:00
Daniel Holbert 2a33c81425 Bug 1353941: Convert a MOZ_RELEASE_ASSERT() expression to "if" + MOZ_CRASH(), to work around clang 3.8 segfault. r=froydnj
MozReview-Commit-ID: Bq2DM61YvQ3

--HG--
extra : rebase_source : 2d546cbabd71f17ac0d9d8b3a98271d57ffc428c
2017-04-05 18:24:56 -07:00
Carsten "Tomcat" Book 023be17063 Merge mozilla-central to autoland 2017-04-11 10:24:02 +02:00
Ricky Chien a866f48455 Bug 1355370 - Remove xpcom/base/ErrorList.h r=wcpan
MozReview-Commit-ID: 8meFWNVYEGo

--HG--
extra : rebase_source : 6894d455bd070024c29249718bc43c823f88868e
2017-04-11 15:48:08 +08:00
Byron Campen [:bwc] f3a2ca7fb5 Bug 1339588 - Part 3: Don't break the nsTimer/nsTimerImpl cycle during Fire. r=froydnj, a=dveditz
MozReview-Commit-ID: J6TNJqGsBv4

--HG--
extra : rebase_source : 363923520a2527911c9b82aaf28d3d3291e95a71
2017-04-06 12:29:57 -05:00
Carsten "Tomcat" Book 7a670cdd01 merge mozilla-inbound to mozilla-central a=merge 2017-04-05 14:33:35 +02:00
JW Wang 4cff3416a0 Bug 1353618 - Optimize storage of MozPromise::mThenValues. r=gerald
1. Set the capacity to 1 when IsExclusive is true.
2. Set it to 3 because Try shows we never have more the 3 elements when IsExclusive is false.

MozReview-Commit-ID: dmIeE6ZTeh

--HG--
extra : rebase_source : fc6b173d3a389d11424238f76cbae1f496155ba5
extra : source : c6203c27b8020999ed39ff43ddf5173f5111ef6b
2017-03-31 18:41:29 +08:00
Paolo Amadini bc9668cdff Bug 1346716 - Remove the entry for "mimeTypes.rdf" in the directory service. r=mak
This improves performance because we won't try to fix the permissions of the file every time the nsIHandlerService implementation wants to open it, and makes it easier to access the file path from xpcshell tests.

MozReview-Commit-ID: DZmLa92qUnZ

--HG--
extra : source : bd0fdce03cc7442079e96318d3a9b519a4d403a9
2017-03-30 15:51:18 +01:00
Carsten "Tomcat" Book 68008bab43 Backed out changeset a52e75fdda07 (bug 1277709) for 10.10 xpcshell failures 2017-04-04 09:55:54 +02:00
Carsten "Tomcat" Book 92b960417c Backed out changeset 8f8e8cd713ad (bug 1352888) 2017-04-04 09:54:55 +02:00
Carsten "Tomcat" Book 6fa4a7de2c Backed out changeset dfdb5742823a (bug 1352889) 2017-04-04 09:54:53 +02:00
L. David Baron 4d700b54f1 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.

MozReview-Commit-ID: JvnxAMBY711

--HG--
extra : transplant_source : %8A%25%FB%E3H%B8_%F1G%F6%3E%0B%29%DF%20%FF%D8%E1%AEw
2017-04-03 20:43:30 -07:00
L. David Baron db2f1da78f 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 : 0T%B0%FA%C0%85v%8B%16%E7%81%03p%F5K%97%B1%9E%92%27
2017-04-03 20:43:29 -07:00
L. David Baron 0b145fb182 Bug 1277709 - Make threadsafe reference counting use the minimum memory sychronization needed. r=froydnj
This uses std::atomic rather than mozilla::Atomic since mozilla::Atomic
does not support using different memory synchronization for different
atomic operations on the same variable.

The added comments could use careful review since, while they reflect my
understanding of the issue, I don't consider myself an expert on the
topic.

MozReview-Commit-ID: 7xByCXt17Dr

--HG--
extra : transplant_source : 8%8Ci%CC%EA%0F%CF%C7%3E%F1%93%F5%C9%ED9%84%F9%3Evx
2017-04-03 20:43:29 -07:00
Olli Pettay 98fff73826 Bug 1351303, add main thread only cache for nsIAtoms to speed up atomization, r=froydnj
--HG--
extra : rebase_source : 9c67cd71c0721329eaeaaa96a295e90abc480042
2017-04-03 23:13:18 +03:00
Bevis Tseng 5daae11f33 Bug 1345464 - Add an optional EventTarget to nsExpirationTracker to support Labeling for Quantum-DOM. r=froydnj
--HG--
extra : rebase_source : f05d3a31543ea8ed35a756a1721adc272c792a08
2017-03-30 09:23:36 -04:00
Bevis Tseng eb452e8278 Bug 1350177 - Part 1: Define ExpirationTrackerImpl as a Thread-Safe Tracker. r=froydnj
1. Define ExpirationTrackerImpl which requires AutoLock before calling Tracker APIs.
2. Move expiration logic from nsExpirationTracker to ExpirationTrackerImpl.
3. Keep nsExprationTracker un-thread-safe with fake Lock acquired.

--HG--
extra : rebase_source : 536876ce2c64240f5470180aa633264d8e5de664
2017-03-27 19:37:29 +08:00
L. David Baron f2802b9d4c Bug 1353181 followup - Fix non-DEBUG warnings-as-errors bustage. 2017-04-04 21:42:18 -07:00
L. David Baron 443904b36a 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 : W4%B8%BA%D5p%102%1B%8D%83%23%E0s%B3%B0f%0D%05%AE
2017-04-04 20:59:21 -07:00
L. David Baron 1b6a8f407e Bug 1353181 - Make nsStringBuffer's reference count use the minimum memory synchronization needed. r=froydnj
This is the same optimization made for ThreadSafeAutoRefCnt in bug
1277709.  However, nsStringBuffer uses a 32-bit reference count all the
time, so it can't easily use ThreadSafeAutoRefCnt.

MozReview-Commit-ID: LpB3xaYbaEE

--HG--
extra : transplant_source : %89%FA%02%402%B1%83%17%81%09%EEw%B0%85%A0%B2%8DK/%D6
2017-04-04 20:59:21 -07:00
L. David Baron 24bffb840f Bug 1277709 - Make threadsafe reference counting use the minimum memory sychronization needed. r=froydnj
This uses std::atomic rather than mozilla::Atomic since mozilla::Atomic
does not support using different memory synchronization for different
atomic operations on the same variable.

The added comments could use careful review since, while they reflect my
understanding of the issue, I don't consider myself an expert on the
topic.

MozReview-Commit-ID: 7xByCXt17Dr

--HG--
extra : transplant_source : %8DM%88%E8%B7%B4%D8a%D6%F5%3F%9B%DC%09X%F3%7C%98%DE%21
2017-04-04 20:59:20 -07:00
Eric Rahm 75452c87a4 Bug 1353143 - Part 6: Remove prlog.h from mozilla/Logging.h. r=froydnj
This removes NSPR logging references from mozilla logging.

MozReview-Commit-ID: 8Zq2tbhdCv
2017-04-01 10:23:18 -07:00
Eric Rahm d98d879754 Bug 1353143 - Part 3: Switch PR_ASSERT usage to MOZ_ASSERT. r=froydnj 2017-04-04 14:36:17 -07:00
Bill McCloskey fcdb251c4b Bug 1340719 - Throw an exception if accessing Xray from wrong docgroup (r=bholley)
MozReview-Commit-ID: BBrRsk3KvGb
2017-04-05 13:26:20 -07:00
JW Wang 57d890fb9c Bug 1353610 - Add null checks. r=bobbyholley
--HG--
extra : rebase_source : ab2c2b6eda18d131a564862c928ae740e7de0b7e
2017-03-31 17:01:35 +08:00
Nathan Froyd a337c2774d Bug 1346919 - add documentation for NewRunnableMethod; r=erahm; f=ehsan 2017-04-05 15:34:36 -04:00
Nathan Froyd 564e8d046e Bug 1353660 - proxy destruction of nsHashPropertyBag's hash table to the main thread; r=mccr8
We need this because the stored values in the hash table may themselves
be main-thread only objects, and destroying them off the main thread
will cause crashes.
2017-04-05 15:31:20 -04:00
Olli Pettay ac0ae74439 Bug 1352734, use memcmp for nsIAtom Equals to improve performance, r=hsivonen
--HG--
extra : rebase_source : 1a78863c52f088609a6edcb6b32bf16bc02a4118
2017-04-02 22:40:06 +03:00
Ted Mielczarek 5f9adc61f1 bug 1300152 - Add nsIDebug2::rustPanic to allow triggering Rust panic for testing. r=froydnj
For testing purposes it will be useful to be able to trigger crashes in Rust
code. Being able to trigger a panic seems like a good place to start. This
will make it easier to validate improvements in crash reporting.

MozReview-Commit-ID: Bh5rBieLLWW

--HG--
rename : toolkit/crashreporter/test/unit/test_crash_moz_crash.js => toolkit/crashreporter/test/unit/test_crash_rust_panic.js
extra : rebase_source : ba9f626ca2d2852f966e93401b8f8f7543615310
extra : source : 8c9117de1e7f40af42b7cbce25bc3780c032fe45
2017-03-31 12:08:57 -04:00
Henri Sivonen c514501f1a Bug 1295611 - Add mozilla::Span. r=froydnj,gerv.
MozReview-Commit-ID: HGNDClVctbE
2017-03-31 13:32:18 +03:00
Iris Hsiao a4e80da339 Backed out changeset 40eb77a98bcf (bug 1300152) 2017-03-31 13:47:37 +08:00
Eric Rahm 478755933a Bug 1351732 - Part 2: Replace use of PLArena with ArenaAllocator in xpcom. r=froydnj
This swaps xpcom's plarena usage to ArenaAllocator. The new ArenaStrdup
extensions are used as well.

MozReview-Commit-ID: DHDfl6IkGJL
2017-03-30 16:46:58 -07:00
Eric Rahm f4d91001fe Bug 1351732 - Part 1: Add an ArenaAllocator strdup extension. r=froydnj
This adds an extension to ArenaAllocator that provides strdup-like
functionality for various string types.

MozReview-Commit-ID: 87SHTs6flHY
2017-03-30 16:46:56 -07:00
Eric Rahm 131c4c002f Bug 943156 - Add a templated ArenaAllocator. r=froydnj
This adds an arena allocator that can be used as a drop-in replacement for
NSPR's PLArena. Example usage for defining an 8-byte aligned allocator that
uses a 4K arena size:

mozilla::ArenaAllocator<4096,8> a;
void* memory = a.Allocate(200);
2017-03-30 16:46:55 -07:00
Ted Mielczarek 0bb49ca2a4 bug 1300152 - Add nsIDebug2::rustPanic to allow triggering Rust panic for testing. r=froydnj
For testing purposes it will be useful to be able to trigger crashes in Rust
code. Being able to trigger a panic seems like a good place to start. This
will make it easier to validate improvements in crash reporting.

MozReview-Commit-ID: Bh5rBieLLWW

--HG--
rename : toolkit/crashreporter/test/unit/test_crash_moz_crash.js => toolkit/crashreporter/test/unit/test_crash_rust_panic.js
extra : rebase_source : 0ac96469629a7a933fcf3bf6720c448db45543eb
extra : source : 8c9117de1e7f40af42b7cbce25bc3780c032fe45
2016-09-02 13:22:21 -04:00
Andrew McCreight 7367aeb120 Bug 1350690 - Add main thread assertion to nsSystemInfo::Init(). r=froydnj
MozReview-Commit-ID: JtlOXqCtJ8Y

--HG--
extra : rebase_source : 99f4d098d4af35c4bbd27e0f99a1a8edff399d32
2017-03-27 08:03:01 -07:00
Jon Coppeard 973692b373 Bug 1345177 - Make RegExpShared a GC thing r=sfink 2017-03-27 10:38:29 +01:00
Wes Kocher 93f5513b72 Merge inbound to central, a=merge
MozReview-Commit-ID: 4K4y2wN5LHh
2017-03-27 17:13:27 -07:00
Bobby Holley ffdc76986b Bug 1351026 - Followup build bustage fix. rpending=froydnj CLOSED TREE
MozReview-Commit-ID: FnzU7d5Emq1
2017-03-27 14:34:46 -07:00
Eric Rahm 9379e75d2f Bug 1350423 - Remove unused PL_ARENA macro in nsStaticNameTable. r=froydnj
MozReview-Commit-ID: 48qPrN7IOnf
2017-03-27 09:15:38 -07:00
Carsten "Tomcat" Book 48d1be80d3 Merge mozilla-central to mozilla-inbound 2017-03-27 12:59:33 +02:00
Jon Coppeard 1376c2700e Backed out changesets e66f564d9749 and 0380d914ad39 (bug 1345177) for rooting hazards 2017-03-27 11:09:54 +01:00
Andrea Marchesini 5b7d646332 Bug 1350239 - SlicedInputStream::Seek must set correct position in the source stream, r=smaug 2017-03-27 11:48:06 +02:00
Jon Coppeard f7a6438226 Bug 1345177 - Make RegExpShared a GC thing r=sfink 2017-03-27 10:38:29 +01:00
JW Wang b45a420b3e Bug 1318226. P2 - add gtest TestTaskQueue to test the order of regular tasks. r=bholley
MozReview-Commit-ID: 9Eg2ALRsV9j

--HG--
extra : rebase_source : 7245dc59749598f631bae3be46e46661e11642f6
extra : intermediate-source : 4fd827e0797d7bc1ac19c81a6e0b7915cf154bfe
extra : source : a96d4417c994020fa8d3df33a894a89192033fe4
2016-11-17 14:25:53 +08:00
JW Wang e13f0faefe Bug 1318226. P1 - preserve the order of regular tasks. r=bholley
MozReview-Commit-ID: FYjbJWYDyd0

--HG--
extra : rebase_source : 1baeeb8d4e5904094bd258893d5cb59ec9ac8944
extra : intermediate-source : 224087f24319d562484be55f3b97a21f9d50577b
extra : source : b6e940be26be76ae7620037b93c98e42504ed979
2017-03-08 17:11:27 +08:00
emilio+bugs@crisal.io 92f1a57200 Bug 1348398: Keep deriving debug in StringRepr. 2017-03-24 15:14:30 -04:00
Michael Layzell 891ba54825 Bug 1348398 - Remove Gecko_Truncate[C]String as it is no longer used, r=froydnj 2017-03-24 15:14:28 -04:00
Carsten "Tomcat" Book 5f408d092d Merge mozilla-central to mozilla-inbound 2017-03-24 14:29:00 +01:00
Carsten "Tomcat" Book 7419b36815 merge mozilla-inbound to mozilla-central a=merge 2017-03-24 14:24:21 +01:00
Valentin Gosu 427ac28f38 Bug 1344498 - Add fallible StripWhitespace r=njn
MozReview-Commit-ID: 8UOTEBlFxfO

--HG--
extra : rebase_source : 2c32cf4b39f9e601b9ebe1a51639000dea9f14f7
2017-03-23 12:52:31 +01:00
Thinker K.F. Li 9cce468c1b Bug 1323076 - Part 4: ConsoleService with flag checking for TaskTracer. r=erahm 2017-03-22 21:49:00 +01:00
Nicholas Nethercote e105cad299 Bug 1346132 (part 2) - Remove set_stderr_callback(). r=mstange.
It's a very general mechanism for replacing the implementation of
printf_stderr().

It's primarily used by the profiler, sparingly, and not in an important way.
Worse, it prevents us from using MOZ_LOG in the profiler, which is something I
want. Because if any code that locks gPSMutex also calls MOZ_LOG, that then
calls printf_stderr(), which calls profiler_log(), which locks gPSMutex, which
deadlocks.

The only other use of set_stderr_callback() is for the ultra-hacky,
for-local-use-only copy_stderr_to_file() function, which was added for B2G
debugging and is no longer necessary.

This patch removes set_stderr_callback() altogether.

--HG--
extra : rebase_source : d31ecb482fe5899f62dc56a38e87d91f9271bab0
2017-03-16 08:17:56 +11:00
Eric Rahm 5246441bae Bug 1349719 - Share max capacity logic in nsTString. r=froydnj
This refactors the max capacity logic so that both |MutatePrep| and |Adopt| can
share it.

MozReview-Commit-ID: CMn4kiAoWub
2017-03-23 12:32:53 -07:00
Cervantes Yu ad89036000 Bug 1320134 - Part 1: Tracking TLS allocations for diagnosing out-of-TLS-slots crashes on Windows. r=froydnj
This tracks TlsAlloc() and TlsFree() calls on Windows for diagnosing crashes when a proces reaches
its limit (1088) for TLS slots. Tracking of TLS allocation is done by intercepting TlsAlloc() and
TlsFree() in kernel32.dll. After initialization, we start tracking the number of allocated TLS
slots. If the number of observed TLS allocations exceeds a high water mark, we record the stack
when TlsAlloc() is called, and the recorded stacks gets serialized in a JSON string ready for
crash annotation.

MozReview-Commit-ID: 5fHVr0eiMy5
2017-03-15 18:20:30 +08:00
Gabriele Svelto 1ab1c1e41b Bug 1322611 - After a crash compute the SHA256 hash of a minidump and attach it to the crash ping; r=Ted, nchen
This patch changes the crashreporter client code as well as the crash service
code to compute a SHA256 hash of a crash' minidump file and add it to the
crash ping. The crash service code computes the hash on the fly before handing
over the crash to the crash manager; the crash manager will then add it to the
crash ping. The crashreporter client on the other hand sends the hash via the
ping it generates but it also adds it to the event file so that the crash
manager can pick it up and send it along with its own crash ping. On Fennec
the crashreporter activity takes care of computing the hash.

SHA256 hash computation uses nsICryptoHash in the crash service, the
java.security.MessageDigest class in Fennec, the bundled NSS library in the
crashreporter when running on Windows and Mac and the system-provided NSS
library under Linux. The latter is required because the crashreporter client
uses the system curl library which is linked to NSS and which would thus clash
with the bundled one if used together.

This patch introduces two new methods for the nsICrashService interface:
|getMinidumpForID()| and |getExtraFileForID()|, these reliably retrieve the
.dmp and .extra files associated with a crash and ensure the files exist
before returning. These new methods are used in the CrashService for
processing and will become the only way to reliably retrieve those files
from a crash ID.

MozReview-Commit-ID: 8BKvqj6URcO

--HG--
extra : source : a4d8291c56fcde00238ab3166bbe6af6dd602340
2017-02-16 07:36:57 +01:00
Boris Zbarsky ec233151ac Bug 1348331 part 2. Switch Preferences::RegisterCallback/RegisterCallbackAndCall consumers that want prefix matches to the new RefisterPrefixCallback(AndCall) APIs. r=froydnj,padenot
MozReview-Commit-ID: 2ebVZO4fN6i
2017-03-21 14:59:02 -04:00
Nathan Froyd 5fd1d453a9 Bug 1312087 - part 1 - move mozilla::{Mutex,CondVar} to use mozglue locking primitives; r=erahm
This change moves us away from NSPR primitives for our primary
synchronization primitives.  We're still using PRMonitor for
ReentrantMonitor, however.

The benefits of this change:

* Slightly faster, as we don't have to deal with some of NSPR's overhead;

* Smaller datatypes.  On POSIX platforms in particular, PRLock is
  enormous. PRCondVar also has some unnecessary overhead.

* Less dynamic memory allocation.  Out of necessity, Mutex and CondVar
  allocated the NSPR data structures they needed, which lead to
  unnecessary checks for failure.

  While sizeof(Mutex) and sizeof(CondVar) may get bigger, since they're
  embedding structures now, the total memory usage should be less.

* Less NSPR usage.  This shouldn't need any explanation.
2017-03-21 10:20:36 -05:00
Ehsan Akhgari 566751834a Bug 1346583 - Remove the PContent::Msg_OpenAnonymousTemporaryFile sync IPC; r=billm 2017-03-21 09:27:48 -04:00
Andrea Marchesini 2e9d67bae0 Bug 1347557 - Move 2 static methods about the IPC serialization of streams into an helper class, r=qdot 2017-03-21 07:47:25 +01:00
Michael Layzell a09ec7fe77 Bug 1347224 - Part 2: Re-add Gecko_Truncate[C]String temporarially to avoid stylo breakage, r=froydnj
MozReview-Commit-ID: 1EhKt434D3k
2017-03-20 14:41:10 -04:00
Michael Layzell 2be5900b6b Bug 1347224 - Part 1: Expose fallible methods on the rust ns[C]String bindings, r=froydnj
This patch adds a series of fallible methods for the rust ns[C]String
bindings, as well as the `set_length` method, which is the same as the
`SetLength` method in C++. `set_length` is marked as unsafe.

The decision was made to make the fallible methods seperate from the
infallible methods, and to use seperate Rust->C++ bindings for each of
them, rather than only binding the fallible bindings, and unwrapping
them in rust-land. This is to try to match the C++ API as closely as
possible, and to ensure that the behavior matches.

MozReview-Commit-ID: FkSomkFUFGD
2017-03-20 14:40:45 -04:00
Eric Rahm b8b8dd4a0c Bug 1348123 - Add release bounds checking when inserting and replacing. r=froydnj
This adds release bounds checking to ReplaceElementsAt, InsertElementAt, and
InsertElementsAt to make sure the insertion point is within the current array
bounds.

MozReview-Commit-ID: 1pFr8LuOROI
2017-03-17 16:40:53 -07:00
Steve Fink 15be199c92 Bug 1346874 - Disable slow gray mark checks on Android, r=mccr8
MozReview-Commit-ID: GyycxPpNDQA

--HG--
extra : rebase_source : a9803e46a04f96eff4683bfdbe0eeeacbd6eb248
2017-03-16 15:41:36 -07:00
David Major ed12ea611f Bug 1346078: Remove nsAString_internal and just use the nsAString name directly. r=bsmedberg
MozReview-Commit-ID: DWDEDMIVKm7

--HG--
extra : rebase_source : 7fe8dc07c816dca234c67761e61cdee372a87e97
2017-03-10 15:17:23 +13:00
Cervantes Yu a00bb8ab35 Backed out changeset 5fd991c5f120 (bug 1320134) for crashing webgl on Windows. r=backout 2017-03-15 12:40:11 +08:00
Nicholas Nethercote d8023679e3 Bug 1345262 (part 2) - Add profiler_{set,clear}_js_context(). r=mstange.
PseudoContext::sampleContext() is always called immediately after
profiler_get_pseudo_stack(). This patch introduces profiler_set_js_context()
and profiler_clear_js_context(), which replace the profiler_get_pseudo_stack()
+ sampleContext() pairs. This takes us a step closer to not having to export
PseudoStack outside the profiler.

--HG--
extra : rebase_source : 8558d1600eafd395cc696d31f3d21fb52a1a74b0
2017-03-09 17:06:35 +11:00
Boris Zbarsky 5a5123809e Bug 1276186. Stop using the locale-sensitive AppendPrintf in code that is supposed to always use '.' as a decimal separator. r=dbaron
MozReview-Commit-ID: ILXSgv5QUr4
2017-03-14 23:16:32 -04:00
David Major 66530030b2 Bug 1344629 - Part 10: Bonus fix: Remove NS_LITERAL_STRING_INIT macros. r=dbaron
As of the previous patch, these are now unused and aren't really buying us much.

MozReview-Commit-ID: HGliIFAcBb7

--HG--
extra : rebase_source : f39105fcb15e1c7eccae5088b34352e849f1b2b6
2017-03-14 15:26:37 +13:00
David Major 96a4158a43 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
David Major 1c35859304 Bug 1344629 - Part 6.5: Allow get() on nsLiteralStrings, excluding temporaries. r=dbaron
This prevents the antipattern found in bug 1341513.

MozReview-Commit-ID: JhxgC7aQDUA

--HG--
extra : rebase_source : b1ff0d240df87b2cbb415183dc93acc8bde7960a
2017-03-14 15:26:36 +13:00
David Major dc67bfc9a3 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
David Major 09c0dcc72b Bug 1344629 - Part 5: Make string tuples work with nsTStringRepr. r=dbaron
This requires some adjustment to Equals(). Previously, when you wrote:
fooString.Equals(barString + bazString)
you'd get a tuple for the operator+, which implicitly converts to nsTSubstring, which resolves into nsTSubstring::Equals(const nsTSubstring&).

Now that Equals has moved one level up:
nsTStringRepr::Equals(const nsTStringRepr&)
The compiler can't make the double-leap from nsTSubstringTuple -> nsTSubstring -> nsTStringRepr.
So I implemented this manually.

MozReview-Commit-ID: 5x8XhndOToJ

--HG--
extra : rebase_source : ab0ec1259af522ea47a237e01f69dd28e593eacd
2017-03-14 10:04:15 +13:00
David Major 522a09c17f Bug 1344629 - Part 4: Cleanup: make string tuples not think in terms of "substring". r=dbaron
In the next patch, tuples will work on nsTStringRepr rather than nsTSubstring, so the notions of TO_SUBSTRING and substring_type are not quite right.

MozReview-Commit-ID: LpUwmGQAWVO

--HG--
extra : rebase_source : 6142500a3d4218d74dda11736b94cf08d6f55335
2017-03-14 10:02:55 +13:00
David Major b7e6bde277 Bug 1344629 - Part 3: Move const accessors from nsTSubstring to nsTStringRepr. r=dbaron
All nsTStringRepr methods must be const, so the mutators remain on nsTSubstring.

I left a small number of const methods on nsTSubstring, e.g. Capacity(), the rationale being that you would only be interested in this method if you intend to mutate the string.

I considered splitting up the typedefs block and leaving behind the ones related to mutation (e.g. nsWritingIterator) but I think it makes for clearer documentation to have them all in one place.

MozReview-Commit-ID: 7dEaRgc8NLK

--HG--
extra : rebase_source : 01b387b7e5bf2f21d6af1afcccf6ec0d7e8a2ac7
2017-03-14 10:02:50 +13:00
David Major fc4fab5ae2 Bug 1344629 - Part 2: Add nsTStringRepr as the new root of the string hierarchy. r=dbaron
I've named it after the similar ns(C)StringRepr in the rust bindings code.

This is just the minimal definition of the structure. Bulk move of methods coming in next patch.

MozReview-Commit-ID: 4aQrpIWRTm7

--HG--
extra : rebase_source : e89d6fbacbaf6e26028e13848ce2877c8f245ba6
2017-03-14 10:01:35 +13:00
David Major 29d7d9433c Bug 1344629 - Part 1: String class cleanup and dead code removal. r=dbaron
Cleanup in preparation for upcoming patches:

- By using an accessor method, nsTPromiseFlatString no longer needs to be a friend.
- The explicit uint32_t constructors are unused.
- The abstract_string_type typedef is unused (and will be potentially confusing in the next patch, so removing).
- The three-param ctor for nsTSubstring no longer needs to be public "for convenience".
- friend class nsTObsoleteAStringThunk_CharT no longer exists.

MozReview-Commit-ID: 4ibJLNzn13k

--HG--
extra : rebase_source : d5a947f398a6dfc801f644f437bae9125424d4d0
2017-03-14 09:28:49 +13:00
Iris Hsiao 5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
Blake Kaplan 42aa6054b3 Bug 1347007 - Register with the profiler after doing so for the ThreadManager. r=njn
MozReview-Commit-ID: 6gtDxmlgOta

--HG--
extra : rebase_source : 782ce4a783c393f809ffca1d0ab2c48daefbac92
2017-03-13 15:03:24 -07:00
David Major 84c2879b84 Bug 1344629 - Part 10: Bonus fix: Remove NS_LITERAL_STRING_INIT macros. r=dbaron
As of the previous patch, these are now unused and aren't really buying us much.

MozReview-Commit-ID: HGliIFAcBb7

--HG--
extra : rebase_source : f39105fcb15e1c7eccae5088b34352e849f1b2b6
2017-03-14 15:26:37 +13:00
David Major e7336ecc95 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
David Major 9236e31186 Bug 1344629 - Part 6.5: Allow get() on nsLiteralStrings, excluding temporaries. r=dbaron
This prevents the antipattern found in bug 1341513.

MozReview-Commit-ID: JhxgC7aQDUA

--HG--
extra : rebase_source : b1ff0d240df87b2cbb415183dc93acc8bde7960a
2017-03-14 15:26:36 +13:00
David Major 40f4821701 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
David Major e9f635bcee Bug 1344629 - Part 5: Make string tuples work with nsTStringRepr. r=dbaron
This requires some adjustment to Equals(). Previously, when you wrote:
fooString.Equals(barString + bazString)
you'd get a tuple for the operator+, which implicitly converts to nsTSubstring, which resolves into nsTSubstring::Equals(const nsTSubstring&).

Now that Equals has moved one level up:
nsTStringRepr::Equals(const nsTStringRepr&)
The compiler can't make the double-leap from nsTSubstringTuple -> nsTSubstring -> nsTStringRepr.
So I implemented this manually.

MozReview-Commit-ID: 5x8XhndOToJ

--HG--
extra : rebase_source : ab0ec1259af522ea47a237e01f69dd28e593eacd
2017-03-14 10:04:15 +13:00
David Major 02daf1d0c9 Bug 1344629 - Part 4: Cleanup: make string tuples not think in terms of "substring". r=dbaron
In the next patch, tuples will work on nsTStringRepr rather than nsTSubstring, so the notions of TO_SUBSTRING and substring_type are not quite right.

MozReview-Commit-ID: LpUwmGQAWVO

--HG--
extra : rebase_source : 6142500a3d4218d74dda11736b94cf08d6f55335
2017-03-14 10:02:55 +13:00
David Major 6ebaf62ee9 Bug 1344629 - Part 3: Move const accessors from nsTSubstring to nsTStringRepr. r=dbaron
All nsTStringRepr methods must be const, so the mutators remain on nsTSubstring.

I left a small number of const methods on nsTSubstring, e.g. Capacity(), the rationale being that you would only be interested in this method if you intend to mutate the string.

I considered splitting up the typedefs block and leaving behind the ones related to mutation (e.g. nsWritingIterator) but I think it makes for clearer documentation to have them all in one place.

MozReview-Commit-ID: 7dEaRgc8NLK

--HG--
extra : rebase_source : 01b387b7e5bf2f21d6af1afcccf6ec0d7e8a2ac7
2017-03-14 10:02:50 +13:00
David Major 4ff2c67fc1 Bug 1344629 - Part 2: Add nsTStringRepr as the new root of the string hierarchy. r=dbaron
I've named it after the similar ns(C)StringRepr in the rust bindings code.

This is just the minimal definition of the structure. Bulk move of methods coming in next patch.

MozReview-Commit-ID: 4aQrpIWRTm7

--HG--
extra : rebase_source : e89d6fbacbaf6e26028e13848ce2877c8f245ba6
2017-03-14 10:01:35 +13:00
David Major c04f2c4296 Bug 1344629 - Part 1: String class cleanup and dead code removal. r=dbaron
Cleanup in preparation for upcoming patches:

- By using an accessor method, nsTPromiseFlatString no longer needs to be a friend.
- The explicit uint32_t constructors are unused.
- The abstract_string_type typedef is unused (and will be potentially confusing in the next patch, so removing).
- The three-param ctor for nsTSubstring no longer needs to be public "for convenience".
- friend class nsTObsoleteAStringThunk_CharT no longer exists.

MozReview-Commit-ID: 4ibJLNzn13k

--HG--
extra : rebase_source : d5a947f398a6dfc801f644f437bae9125424d4d0
2017-03-14 09:28:49 +13:00
Wes Kocher 8010f266fb Merge m-c to autoland, a=merge
MozReview-Commit-ID: Hikpu6ARByb
2017-03-13 16:40:18 -07:00
Xidorn Quan cf27123d34 Bug 1345804 part 1 - Constify several stuff in nsIAtom. r=erahm
MozReview-Commit-ID: Izzu0MpcKMr

--HG--
extra : rebase_source : 4c44fc79f5d0c4fd34f77c8c14e0888186e2a4f0
2017-03-10 11:38:49 +11:00
Cervantes Yu 201ba88937 Bug 1320134 - Part 1: Tracking TLS allocations for diagnosing out-of-TLS-slots crashes on Windows. r=froydnj
This tracks TlsAlloc() and TlsFree() calls on Windows for diagnosing crashes when a proces reaches
its limit (1088) for TLS slots. Tracking of TLS allocation is done by intercepting TlsAlloc() and
TlsFree() in kernel32.dll. After initialization, we start tracking the number of allocated TLS
slots. If the number of observed TLS allocations exceeds a high water mark, we record the stack
when TlsAlloc() is called, and the recorded stacks gets serialized in a JSON string ready for
crash annotation.

MozReview-Commit-ID: 5fHVr0eiMy5
2017-03-01 18:52:07 +08:00
Blake Kaplan b48fcd2501 Bug 1340665 - Fix warnings on shutdown. r=billm
The code to make a ValidatingDispatcher break cycles when we're done with it
assumes that XPCOM is still up and running. This isn't the case during
shutdown. When XPCOM shuts down, we should avoid do_GetMainThread.

MozReview-Commit-ID: 5Gpko9FbFxl

--HG--
extra : rebase_source : 8c00c83b06e890802ade0d6df2a93f64dc8ea376
2017-03-10 17:55:35 -08:00
David Major 7e6c4486b9 Bug 1346100 - Use nsDependentSubstring for the substring splitter's pieces. r=dbaron 2017-03-13 15:56:23 +13:00
David Major af163b2b51 Bug 1346099: Fix a typo in the string splitter. r=dbaron
This just-so-happened to work because nobody refers to the splitter directly by name.

The added gtest doesn't actually prove that this patch fixes anything, but I figured we could use a wide string for good measure.

MozReview-Commit-ID: 1ADy4X44HO1
2017-03-13 11:19:49 +13:00
Paul Adenot 6a5cf2e776 Bug 1345517 - Remove unrelated debug printfs.
MozReview-Commit-ID: JvGrIBDk78b
2017-03-10 17:05:06 +01:00
Wes Kocher 65140a44e3 Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: Gj4s6DtqKmw
2017-03-09 16:33:31 -08:00
Dan Minor d6eb4d1229 Bug 1343557 - Make operator AutoCreateAndDestroyReentrantMonitor::ReentrantMonitor* const; r=bsmedberg
MozReview-Commit-ID: Fy3k5fvEs5J

--HG--
extra : rebase_source : 52b9939a66bc828ca2609921300026b65d54f8e5
2017-03-02 08:57:54 -05:00
Byron Campen [:bwc] 259065f253 Bug 1339588 - Part 2: Help prevent nullptr crashes due to misuse of the timer API. r=froydnj
MozReview-Commit-ID: BXCGYWnFqSj

--HG--
extra : rebase_source : 04d7d2180ad7713b5ee256cfd256cddd9d0d8dd7
extra : source : f21b4b01a1a95554f266cc184347d07c6583e395
2017-02-14 16:27:33 -06:00
Byron Campen [:bwc] ada35c9a53 Bug 1339588 - Part 1: Simplify nsTimerEvent::Cancel, since there's no need to release the nsTimerImpl itself. r=froydnj
MozReview-Commit-ID: 6br6DaDqxR0

--HG--
extra : rebase_source : 13cde860824483332c42ac2f86bca722bf42d36b
extra : source : 47a3ac382469cb8bd4cdfa123457a6d6b4f11d39
2017-02-14 15:29:01 -06:00
Paul Adenot 7cb8574d6c Bug 1345517 - Add new AudioNodes to the Web Audio devtools. r=jsantell
MozReview-Commit-ID: KmTShPEXkBe

--HG--
extra : rebase_source : 08c4558bf5bb9b2ed101b08459e6ac0ff0a5de37
2017-03-08 17:16:43 +01:00
Eric Rahm 3bec954d62 Bug 792209 - Remove nsISupportsArray. r=froydnj
MozReview-Commit-ID: G28VUoYj9Wj
2016-11-17 11:45:41 -08:00
Andrea Marchesini 12b54aa0f5 Bug 1299500 - Get rid of DeviceStorage API - part 10 - DeviceStorage, r=ehsan, r=billm 2017-03-08 20:15:45 +01:00
Ben Kelly 7300a549b0 Bug 1345251 Make MozPromise usable on worker threads. r=gerald 2017-03-08 11:45:07 -05:00
Andrea Marchesini 2d8722e0b8 Bug 1344204 - nsMultiplexInputStream should be serializable/cloneable following the internal sub streams, r=smaug 2017-03-08 07:48:16 +01:00
Jim Chen 53a1107cd1 Bug 1343075 - Use GeckoEditableSupport from PuppetWidget; r=masayuki r=rbarker r=snorp r=esawin
Bug 1343075 - 1a. Add TextEventDispatcherListener::GetIMEUpdatePreference; r=masayuki

Add a GetIMEUpdatePreference method to TextEventDispatcherListener to
optionally control which IME notifications are received by NotifyIME.
This patch also makes nsBaseWidget forward its GetIMEUpdatePreference
call to the widget's native TextEventDispatcherListener.

Bug 1343075 - 1b. Implement GetIMEUpdatePreference for all TextEventDispatcherListener; r=masayuki

This patch implements GetIMEUpdatePreference for all
TextEventDispatcherListener implementations, by moving previous
implementations of nsIWidget::GetIMEUpdatePreference.

Bug 1343075 - 2. Allow setting a PuppetWidget's native TextEventDispatcherListener; r=masayuki

In PuppetWidget, add getter and setter for the widget's native
TextEventDispatcherListener. This allows overriding of PuppetWidget's
default IME handling. For example, on Android, the PuppetWidget's native
TextEventDispatcherListener will communicate directly with Java IME code
in the main process.

Bug 1343075 - 3. Add AIDL interface for main process; r=rbarker

Add AIDL definition and implementation for an interface for the main
process that child processes can access.

Bug 1343075 - 4. Set Gecko thread JNIEnv for child process; r=snorp

Add a JNIEnv* parameter to XRE_SetAndroidChildFds, which is used to set
the Gecko thread JNIEnv for child processes. XRE_SetAndroidChildFds is
the only Android-specific entry point for child processes, so I think
it's the most logical place to initialize JNI.

Bug 1343075 - 5. Support multiple remote GeckoEditableChild; r=esawin

Support remote GeckoEditableChild instances that are created in the
content processes and connect to the parent process GeckoEditableParent
through binders.

Support having multiple GeckoEditableChild instances in GeckoEditable by
keeping track of which child is currently focused, and only allow
calls to/from the focused child by using access tokens.

Bug 1343075 - 6. Add method to get GeckoEditableParent instance; r=esawin

Add IProcessManager.getEditableParent, which a content process can call
to get the GeckoEditableParent instance that corresponds to a given
content process tab, from the main process.

Bug 1343075 - 7. Support GeckoEditableSupport in content processes; r=esawin

Support creating and running GeckoEditableSupport attached to a
PuppetWidget in content processes.

Because we don't know PuppetWidget's lifetime as well as nsWindow's,
when attached to PuppetWidget, we need to attach/detach our native
object on focus/blur, respectively.

Bug 1343075 - 8. Connect GeckoEditableSupport on PuppetWidget creation; r=esawin

Listen to the "tab-child-created" notification and attach our content
process GeckoEditableSupport to the new PuppetWidget.

Bug 1343075 - 9. Update auto-generated bindings; r=me
2017-03-07 22:34:39 -05:00
Michael Layzell 46ade67ada Bug 1331434 - Part 2: Add MOZ_MAY_CALL_AFTER_MUST_RETURN and MOZ_MUST_RETURN_FROM_CALLER annotations, r=ehsan
MozReview-Commit-ID: 1o2egvdhkqT
2017-03-07 19:06:48 -05:00
Jon Coppeard 2c0a710941 Bug 1335751 - Check all gray marking state before cycle collection in debug builds r=mccr8 2017-03-05 09:23:33 +00:00
Carsten "Tomcat" Book 087da3f0d9 merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
Carsten "Tomcat" Book 11a63f44ea merge autoland to mozilla-central a=merge 2017-03-07 15:04:48 +01:00
ffxbld cce942762c Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release
MozReview-Commit-ID: GEyM0F1O4hP
2017-03-06 23:53:55 +01:00
Andrew McCreight 2971fabfd4 Bug 1344848 - Don't check for atom leaks unless we're checking for other leaks. r=erahm
MozReview-Commit-ID: H5x8cLv0YGk
2017-03-06 22:27:08 -05:00
Andrew McCreight 70a775766d Bug 1344848 - Don't check for atom leaks unless we're checking for other leaks. r=erahm
MozReview-Commit-ID: H5x8cLv0YGk

--HG--
extra : rebase_source : a2d204222a7ed509968bbeffa4aa7483ec524796
2017-03-06 11:50:30 -08:00
David Major ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
Honza Bambas 654b5c9af9 Bug 1320458 - Make logging by sandboxed child processes to a file work on Windows, r=aklotz
MozReview-Commit-ID: 7eiW3Lo6q8Z
2017-03-06 17:42:31 +01:00
Jonathan Kew 3873ed8f1c Bug 1344555 - Make nsTSubstring::Split a const method. r=gcp 2017-03-06 10:31:02 +00:00
Jon Coppeard e81021b4be Backed out 2 changesets (bug 1335751) for mochitest devtools failures 2017-03-05 12:37:31 +00:00
Jon Coppeard ac9f0854be Bug 1335751 - Check all gray marking state before cycle collection in debug builds r=mccr8 2017-03-05 09:23:33 +00:00
Jon Coppeard 12f4fcc022 Bug 1342181 - Run weak mapping fixup after GC before CC r=mccr8 2017-03-05 09:19:24 +00:00
Emilio Cobos Álvarez 30bd5679fd Bug 1344209: Handle empty strings gracefully in rust nsString bindings. r=mystor
MozReview-Commit-ID: 5lI8LXwZIML
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-03 17:49:37 +01:00
Carsten "Tomcat" Book cf269a43bd merge mozilla-inbound to mozilla-central a=merge 2017-03-03 13:03:48 +01:00
Xidorn Quan 01addcd50e Bug 1342303 part 6 - Remove nsCOMArray::Enumerate{Forwards,Backwards}. r=erahm
MozReview-Commit-ID: GLappWGZdtz

--HG--
extra : rebase_source : 0c191193ff5a6040a809d17ac234b5e9e733656e
2017-02-24 21:37:07 +11:00
Xidorn Quan 5068cf4922 Bug 1342303 part 2 - Add range-based for loop support to nsCOMArray. r=erahm
MozReview-Commit-ID: 7T8Z0PVg2ex

--HG--
extra : rebase_source : 8108344d6607145b231e20d82cf2b3792ce5a4bd
2017-02-24 21:31:15 +11:00
Xidorn Quan 63753595c2 Bug 1342303 part 1 - Make nsTArrayIterator an independent class. r=erahm
MozReview-Commit-ID: LbkIGEH0Irl

--HG--
extra : rebase_source : d5782ab4cc9c0f0570ecba490bec989ce55bb654
2017-02-24 16:14:06 +11:00
Wes Kocher 5bb9a497ef Backed out 6 changesets (bug 1342303) for build bustage a=backout
Backed out changeset 89137679a68c (bug 1342303)
Backed out changeset 20a1bcb47c33 (bug 1342303)
Backed out changeset bc3b2e7a383b (bug 1342303)
Backed out changeset bdc491b9ebde (bug 1342303)
Backed out changeset 5c6042dee665 (bug 1342303)
Backed out changeset b5de1dfff82f (bug 1342303)

MozReview-Commit-ID: BjlVAX480jI
2017-03-02 16:35:43 -08:00
Xidorn Quan 1297589623 Bug 1342303 part 6 - Remove nsCOMArray::Enumerate{Forwards,Backwards}. r=erahm
MozReview-Commit-ID: GLappWGZdtz

--HG--
extra : rebase_source : 72ebafcbf89b8fce123101d23c3d65bbc8c3bdff
2017-02-24 21:37:07 +11:00