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

16186 Коммитов

Автор SHA1 Сообщение Дата
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
Xidorn Quan 9fba97cea0 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 d21a17fac7 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 e447319b94 Merge inbound to central, a=merge
MozReview-Commit-ID: DuLPg9KE8Ci

--HG--
rename : browser/components/extensions/ext-theme.js => toolkit/components/extensions/ext-theme.js
rename : browser/components/extensions/schemas/theme.json => toolkit/components/extensions/schemas/theme.json
rename : browser/components/extensions/test/browser/browser_ext_themes_chromeparity.js => toolkit/components/extensions/test/browser/browser_ext_themes_chromeparity.js
rename : browser/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js => toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js
rename : browser/components/extensions/test/browser/browser_ext_themes_lwtsupport.js => toolkit/components/extensions/test/browser/browser_ext_themes_lwtsupport.js
2017-03-02 14:57:41 -08:00
Tom Tromey 3f70992816 Bug 1341880 - do not emit trailing \0 in PrintfState; r=glandium
MozReview-Commit-ID: 2di7CsDCWLF

--HG--
extra : rebase_source : f5469d4b3e818204848123ea163c7f0f08563f7c
2017-02-27 13:29:54 -07:00
Dragana Damjanovic 29f090a0d6 Bug 1343600 - add TLS handshake Start/Stop events. r=:valentin 2017-03-02 03:07:00 +01:00
Benjamin Smedberg ac59a7e7f3 Bug 1332639 followup. I apparently didn't actually remove the nsStringAPI.* files, but that was the intention, r=oops
MozReview-Commit-ID: GJBNWAmO6iy

--HG--
extra : rebase_source : 1ebfee5b368d0358ed1dad46ff84cc5bf57bb834
2017-03-02 09:23:08 -05:00
Honza Bambas b338abfa75 Bug 1341017 - Fix XPCOM logging to work correctly with vsnprintf results. r=froydnj 2017-03-01 05:02:00 -05:00
Wes Kocher bd0bfddf8e Merge m-c to inbound, a=merge
MozReview-Commit-ID: Fypud50dqYw
2017-03-02 15:03:11 -08:00
Daniel Holbert 95a650ec1b Bug 1343975: Get rid of all dos/windows linebreaks in Mozilla C++ code. r=ehsan
This is an automated patch, generated by the following command:
find . -name "*.h" -exec fromdos {} \; && \
  find . -name "*.cpp" -exec fromdos {} \; && \
  hg revert -C gfx/angle \
               gfx/sfntly \
               media/webrtc \
               media/libstagefright \
               media/openmax_il \
               other-licenses

MozReview-Commit-ID: Gunlz3vE3h6
2017-03-02 13:08:29 -08:00
Carsten "Tomcat" Book b43c07a10c Merge mozilla-central to mozilla-inbound 2017-03-01 16:39:27 +01:00
Carsten "Tomcat" Book 3b3f4c17a2 merge mozilla-inbound to mozilla-central a=merge 2017-03-01 11:40:59 +01:00
Kyle Machulis 265309cd59 Bug 1343337 - Remove IsDispatchReliable check from AbstractThread; r=bholley
MozReview-Commit-ID: JxnyAZpzIcV
2017-02-28 20:34:37 -08:00
Kyle Machulis 27b05c3ae5 Bug 1343335 - Add asserts to check for null AbstractThread targets in MozPromise; r=bholley
AbstractThread::GetCurrent() can return null if a thread isn't a
default AbstractThread (MainThread, etc). This doesn't get caught in
MozPromise until we try to check for reliability of dispatching on the
thread. Adding asserts to make things clearer on crashes.

MozReview-Commit-ID: AQJwpdTUiHZ
2017-02-28 20:34:37 -08:00
Benjamin Smedberg d9c7494134 Bug 1332639 - Remove the external string API: nsStringAPI.h/cpp and nsEmbedString.h, r=glandium
MozReview-Commit-ID: 9dZcmMAI0Vk

--HG--
extra : rebase_source : 5561cf7f3318c60f082fff02c5e78aba661f6437
2017-02-27 11:41:52 -05:00
Benjamin Smedberg ac290e07e4 Bug 1332639 - Fix nsBrowserApp.cpp and related headers to compile without the external string API, r=glandium
MozReview-Commit-ID: CQjtpA2lxAM

--HG--
extra : rebase_source : ae92ab7141cba8f3db41d5130059d02866242ccd
2017-02-27 13:39:34 -05:00
JW Wang 4774e42b7f Bug 1342831 - devirtualize AssertIsDead(). r=gerald
MozReview-Commit-ID: 9dNDiTfwlLR

--HG--
extra : rebase_source : 38160e4208d143fba0d5ab672e0ff0f2788a8191
extra : intermediate-source : bccf12e75d02e9ca54d604219ca80e16d9f0b4e5
extra : source : 4f4dcf63b296af9676ec59d0b85af8fc5e0a1d80
2017-02-25 22:56:49 +08:00
Ehsan Akhgari 116c304388 Bug 1342560 - Guarantee that the empty string atom is always static; r=froydnj 2017-02-27 10:51:43 -05:00
Wes Kocher f8633189c2 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Hh4I1wa4u49
2017-02-24 16:53:23 -08:00
Honza Bambas 7478e3a8b9 Bug 1340577 - Add release-grade assertions to various XPCOM string API implementations to avoid input causing an overflow. r=froydnj
--HG--
extra : rebase_source : af6aaf66863cb6a981a4d8f0deeac8e0f40278c1
2017-02-21 11:38:00 -05:00
Carsten "Tomcat" Book 7256146318 merge mozilla-inbound to mozilla-central a=merge 2017-02-24 11:46:38 +01:00
Julian Seward 4cd04ecc8a Bug 1341255 - Profiler tidyups: remove StackEntry, rename ProfileEntry to ProfileBufferEntry (part 1: remove StackEntry). r=n.nethercote.
--HG--
extra : rebase_source : 6418946b1ebeb82abdccdb10a03380a40c00da21
2017-02-23 23:04:13 +01:00
Mike Conley 4e37be383a Bug 1312883 - Use MozStackWalk to gather native stacks on Windows. r=gfritzsche,jchen,liuche
MozReview-Commit-ID: A2aZAL03FG2

--HG--
extra : rebase_source : c5b3871e59f7752966ca4db023b1fa78d4fb574a
2017-02-16 12:05:46 -05:00
Mike Conley 5276916b04 Bug 1312883 - Remove all thread context processing from ThreadStackHelper. r=jchen
MozReview-Commit-ID: LpMSf6bSLy8

--HG--
extra : rebase_source : b77714eee6b3d2e52763d069d43bdaeab76bae45
2017-02-17 17:13:57 -05:00
Mike Conley 8a7ba54d3b Bug 1312883 - MOZ_THREADSTACKHELPER_NATIVE should only be true on Windows. r=jchen
MozReview-Commit-ID: 3gf5FcnUUwa

--HG--
extra : rebase_source : 43bbc8d3b46e097a8045fc43c2b3a0d524ddd30d
2017-02-10 10:35:44 -05:00
Nicholas Nethercote 352554c8f6 Bug 1340928 (part 10) - Remove nested calls to profiler_{init,shutdown}(). r=mstange.
The profiler can currently handle nested calls to profiler_{init,shutdown}() --
only the first call to profiler_init() and the last call to profiler_shutdown()
do anything. And sure enough, we have the following.

- Outer init/shutdown pairs in XRE_main()/XRE_InitChildProcess() (via
  GeckoProfilerInitRAII).

- Inner init/shutdown pairs in NS_InitXPCOM2()/NS_InitMinimalXPCOM() (both shut
  down in ShutdownXPCOM()).

This is a bit silly, so the patch removes the inner pairs, and adds a
now-needed pair in XRE_XPCShellMain. This will allow gInitCount -- which tracks
the nesting depth -- to be removed in a future patch.

--HG--
extra : rebase_source : 7e8dc6ce81ce10269d2db6a7bf32852c396dba0e
2017-02-15 17:08:38 +11:00
David Parks d884f8d253 Bug 1328996 - Add ability for 64-bit MOV instructions (those with REX.W bit set) to be patched in the DLL interceptor harness. r=aklotz
Also adds some ASSERTs to catch failures in the DLL interceptor.

--HG--
extra : rebase_source : 1de8f5f73ca8b802fd5338fa87f33cc742a63e47
2017-02-03 11:58:20 -08:00
David Parks 26437f4ecd Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.

--HG--
extra : rebase_source : 4d5637bcdbeae605b0b99e9192598d48f371b698
2017-02-14 15:08:40 -08:00
David Parks 21bf9d1a88 Bug 1284897 - Add missing hooked methods to TestDllInterceptor. r=aklotz
Added ASSERTions to nsWindowsDllInterceptor in case of a failed detour hook, with an exception for the RET opcode that appears in ImmReleaseContext. Added documentation about TestDllInterceptor.

--HG--
extra : rebase_source : a3c6fe0949f5503979a062bdaa5f35526ddee73b
2017-02-07 12:00:45 -08:00
David Parks 81628820f6 Bug 1284897 - Add opcodes to nsWindowsDllInterceptor for GetSaveFileNameW, GetOpenFileNameW and ImmReleaseContext. r=aklotz
This includes a near-jump CALL instruction in x64, which expands to a far-jump CALL with a 64-bit address as inline data. This requires us to abandon the method where we memcpy the code block into the trampoline and, instead, build the trampoline function as we go.

--HG--
extra : rebase_source : 7f90ce5ba1a82dff731aff1ac17117c684b7b2cf
2017-01-20 16:03:44 -08:00
Honza Bambas 5aaba51ccb Bug 1340581 - Add some release-grade assertions to mozilla::Tokenizer to catch string overflows. r=froydnj
--HG--
extra : rebase_source : 2c2553e08061c5b3db915b2edcb19716aeac1cce
2017-02-22 06:53:00 -05:00
Sebastian Hengst 4ad1529674 Backed out changeset 5739a7f790f2 (bug 1333899) for failing reftest svg-image-datauri-1.html on Linux opt and pgo. r=backout 2017-02-22 10:00:50 +01:00
Andrea Marchesini 9f369c0e29 Bug 1339710 - Remove the implementation of SlicedInputStream::ReadSegments, r=smaug 2017-02-22 09:42:27 +01:00
Andrea Marchesini 930614ab07 Bug 1339710 - SlicedInputStream should be nsISeekableStream, r=smaug 2017-02-22 09:41:59 +01:00
Andrea Marchesini 0500e8f2e7 Bug 1339710 - SlicedInputStream should be an nsIIPCSerializableInputStream, r=smaug 2017-02-22 09:41:05 +01:00
Andrea Marchesini 5dfc951f15 Bug 1339710 - SlicedInputStream should not be nsICloneableInputStream if the source stream is not, r=smaug 2017-02-22 09:40:46 +01:00
Iris Hsiao f9bdfe10bb Backed out 5 changesets (bug 1339710) for GTest failures in TestSlicedInputStream.StartBiggerThan
Backed out changeset 7c0ec55b44dc (bug 1339710)
Backed out changeset cbb4e1c2aada (bug 1339710)
Backed out changeset c685dca493f5 (bug 1339710)
Backed out changeset 4761a15d45fd (bug 1339710)
Backed out changeset 7561692c1bc7 (bug 1339710)
2017-02-22 16:19:50 +08:00
Andrea Marchesini 2431d460d2 Bug 1339710 - Remove the implementation of SlicedInputStream::ReadSegmenets, r=smaug 2017-02-22 07:57:54 +01:00
Andrea Marchesini 76b13c0185 Bug 1339710 - SlicedInputStream should be nsISeekableStream, r=smaug 2017-02-22 07:57:14 +01:00
Andrea Marchesini a75afeb38f Bug 1339710 - SlicedInputStream should be an nsIIPCSerializableInputStream, r=smaug 2017-02-22 07:55:50 +01:00
Andrea Marchesini f981e3155b Bug 1339710 - SlicedInputStream should not be nsICloneableInputStream if the source stream is not, r=smaug 2017-02-22 07:54:46 +01:00
Eric Rahm 9279ddcaa9 Bug 1333899 - Part 1: Add a fallible NS_UnescapeURL. r=froydnj
This adds a fallible version of |NS_UnescapeURL| that can be used to
gracefully handle allocation failures when the string needs to be unescaped.

MozReview-Commit-ID: 1eXPzeB2yrI
2017-02-21 17:56:34 -08:00
Marco Castelluccio 732bc992ae Bug 1341023 - Take module name encoding into account for late writes and hangs. r=Dexter 2017-02-21 22:44:42 +00:00
Sebastian Hengst 1c6c3bfb07 Backed out changeset a176abd99d2b (bug 1284897) for "Unknown sync IPC message PPluginModule::GetFileName"; needs review from an IPC peer now. r=backout on a CLOSED TREE 2017-02-21 23:15:11 +01:00
Sebastian Hengst 5400f1a2d3 Backed out changeset 4e81ec8850dc (bug 1284897) 2017-02-21 23:13:34 +01:00
Sebastian Hengst 68e7240c0c Backed out changeset 71b9ac06a60a (bug 1284897) 2017-02-21 23:13:29 +01:00
David Parks 82eb0f3fdd Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.

--HG--
extra : rebase_source : e34e8b50101cc40ded26e80791052123b24c8243
extra : histedit_source : 69c9b2dc91546adbfdad03b5d43842809191ffb9
2017-02-14 15:08:40 -08:00
David Parks 258144b97c Bug 1284897 - Add missing hooked methods to TestDllInterceptor. r=aklotz
Added ASSERTions to nsWindowsDllInterceptor in case of a failed detour hook, with an exception for the RET opcode that appears in ImmReleaseContext. Added documentation about TestDllInterceptor.

--HG--
extra : rebase_source : 48a38a09a1feb63600e12eba997a83f646cd1595
extra : histedit_source : 566cec5c47c400402e2e4dfa0cdc6d53d82b0815
2017-02-07 12:00:45 -08:00
David Parks ad89b9cf9b Bug 1284897 - Add opcodes to nsWindowsDllInterceptor for GetSaveFileNameW, GetOpenFileNameW and ImmReleaseContext. r=aklotz
This includes a near-jump CALL instruction in x64, which expands to a far-jump CALL with a 64-bit address as inline data. This requires us to abandon the method where we memcpy the code block into the trampoline and, instead, build the trampoline function as we go.

--HG--
extra : rebase_source : f0362c4b8200ba3d05191fdd45c5783dccd444bc
extra : histedit_source : 3018adf0c7d5849f87adc5e5459acf9f0e56301c
2017-01-20 16:03:44 -08:00
Emanuel Hoogeveen 23c68657e0 Bug 1338574 - Part 7: Use MOZ_CRASH_UNSAFE_PRINTF in XPCOM. r=froydnj
--HG--
extra : rebase_source : 472e0aa151692bda55b7bf3f8d98cf7bb4488481
2017-02-21 18:02:03 +01:00
Sebastian Hengst c90f5ca62d Backed out changeset 42f0a217197d (bug 1312883) for build bustage Windows due to unknown identifiers. r=backout on a CLOSED TREE 2017-02-24 14:26:08 +01:00
Sebastian Hengst be695326cc Backed out changeset d6b3328c9573 (bug 1312883) 2017-02-24 14:25:20 +01:00
Sebastian Hengst 783a571c6e Backed out changeset fddfc0739043 (bug 1312883) 2017-02-24 14:25:15 +01:00
Mike Conley 3b9be9b187 Bug 1312883 - Use MozStackWalk to gather native stacks on Windows. r=gfritzsche,jchen,liuche
MozReview-Commit-ID: A2aZAL03FG2

--HG--
extra : rebase_source : 6cda7d88a916cec85a7c33ece5efe5eec76ef04f
2017-02-16 12:05:46 -05:00
Mike Conley c21551f8d7 Bug 1312883 - Remove all thread context processing from ThreadStackHelper. r=jchen
MozReview-Commit-ID: LpMSf6bSLy8

--HG--
extra : rebase_source : 81ef9f867a122adde7ad4287b762c987adeed5a8
2017-02-17 17:13:57 -05:00
Mike Conley 9a8638cf78 Bug 1312883 - MOZ_THREADSTACKHELPER_NATIVE should only be true on Windows. r=jchen
MozReview-Commit-ID: 3gf5FcnUUwa

--HG--
extra : rebase_source : 5575f8de677e47e933679e0ecb139884b3a9444e
2017-02-10 10:35:44 -05:00
Carsten "Tomcat" Book 73835fd06d Merge mozilla-central to autoland 2017-02-24 11:54:01 +01:00
Dimi Lee 244358a9ac Bug 1335974 - Add more error codes to URLCLASSIFIER_UPDATE_ERROR. r=francois
MozReview-Commit-ID: AAd6Yu0AuUO

--HG--
extra : rebase_source : 63fdc2309348355d74b9bb738d75953d0b435b0f
2017-02-22 16:25:04 +08:00
Jan Beich 5f6e848e09 Bug 1330119 - Build Linux aarch64 code in XPTCALL also on BSDs. r=froydnj
MozReview-Commit-ID: 92T1qG5yVx2

--HG--
extra : rebase_source : db1579c6ef5493bbdeb347d9021faa521261d24b
2017-01-10 22:50:32 +00:00
Wes Kocher 8c4ce17711 Merge inbound to m-c a=merge
MozReview-Commit-ID: DCUf7VEDrTt
2017-02-17 13:38:51 -08:00
Honza Bambas af9b0f549f Bug 1340260 - Fix gtest Werror build bustage on a CLOSED TREE. 2017-02-17 12:35:59 -05:00
Honza Bambas 5d95d03e70 Bug 1340260 - Fix potentially wrong string returned from Tokenizer::ReadUntil, keep Record/Claim work after ReadUntil. r=froydnj
--HG--
extra : rebase_source : 1029f9b6743085b7865554fdedc1c96e9239b13a
2017-02-17 08:13:00 -05:00
Jan de Mooij 7c17ed23c6 Bug 1337499 - Take the Win64 stackwalk lock in WalkStackMain64 to avoid deadlocks. r=mstange 2017-02-17 10:51:11 +01:00
Phil Ringnalda 87ae1a50e4 Backed out 5 changesets (bug 1284897) for mozilla::SandboxPermissions::RemovePermissionsForProcess crashes
Backed out changeset 19b2fcee13a9 (bug 1284897)
Backed out changeset a5171791437f (bug 1284897)
Backed out changeset 3ea8b8a18515 (bug 1284897)
Backed out changeset 21497a4e3bde (bug 1284897)
Backed out changeset 12e17d5f0fa9 (bug 1284897)
2017-02-16 22:14:15 -08:00
David Parks e9bcaf4cbe Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.
2017-02-14 15:08:40 -08:00
David Parks cb9c91b2bb Bug 1284897 - Add missing hooked methods to TestDllInterceptor. r=aklotz
Added ASSERTions to nsWindowsDllInterceptor in case of a failed detour hook, with an exception for the RET opcode that appears in ImmReleaseContext. Added documentation about TestDllInterceptor.
2017-02-07 12:00:45 -08:00
David Parks e1341ab02e Bug 1284897 - Add opcodes to nsWindowsDllInterceptor for GetSaveFileNameW, GetOpenFileNameW and ImmReleaseContext. r=aklotz
This includes a near-jump CALL instruction in x64, which expands to a far-jump CALL with a 64-bit address as inline data. This requires us to abandon the method where we memcpy the code block into the trampoline and, instead, build the trampoline function as we go.
2017-01-20 16:03:44 -08:00
David Major 6feec2967a Bug 1339968 - Remove NS_MULTILINE_LITERAL_STRING. r=froydnj 2017-02-17 15:24:11 +13:00
Wes Kocher ea31c4b64f Merge inbound to central, a=merge
MozReview-Commit-ID: CCUSdOe7w2z
2017-02-16 09:28:09 -08:00
Carsten "Tomcat" Book f3b2544de0 Merge mozilla-central to autoland 2017-02-16 13:20:11 +01:00
Wes Kocher 3797956aa6 Merge m-c to inbound a=merge
MozReview-Commit-ID: BemR756HJnR
2017-02-15 16:33:03 -08:00
Wes Kocher 017c515285 Merge inbound to m-c a=merge
MozReview-Commit-ID: IKI0zVtF1n9
2017-02-15 16:18:13 -08:00
Jon Coppeard 5dd6187a2c Bug 1336467 - Don't blacken weakmap key unless both the delegate and the map are black r=mccr8 2017-02-16 10:29:33 +00:00
Michał Górny f9a50474a4 Bug 1329798 - Include sys/sysmacros.h for major(), minor() on Linux. r=glandium
Include sys/sysmacros.h explicitly as that will be required by future
glibc versions to expose major() and minor() macros.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1329798
2017-02-15 00:49:00 +01:00
Michael Layzell 59bb3b9927 Bug 1339218 - Comment wording fixup, r=me
MozReview-Commit-ID: 8T0ibqe17Ru
2017-02-15 12:10:46 -05:00
Michael Layzell 58cab3c905 Bug 1339218 - Re-introduce the ns[C]StringRepr type for use in bindings with custom destructor logic, r=froydnj
MozReview-Commit-ID: 3VUWFA5tX1L
2017-02-15 12:02:54 -05:00
Bill McCloskey 8eb70fcb8f Bug 1339289 - Make sure labeled runnables have names (r=ehsan)
MozReview-Commit-ID: C6w8Q4NPBtt
2017-02-15 12:30:01 -08:00
Bill McCloskey 0cda76d680 Bug 1339289 - Give names to a lot of common timers (r=ehsan)
MozReview-Commit-ID: IMsv5bkyjBL
2017-02-15 12:30:01 -08:00
Bill McCloskey 194043ae97 Bug 1339289 - Give names to a lot of common runnables (r=ehsan)
MozReview-Commit-ID: 5IdvK6kgoAW
2017-02-15 12:30:01 -08:00
Boris Zbarsky 41700419ad Bug 1339540 part 3. Use nsresult values in the ErrorResult error module in place of NS_ERROR_TYPE_ERR/NS_ERROR_RANGE_ERR in ErrorResult code. r=smaug 2017-02-15 00:02:36 -05:00
Boris Zbarsky 2816ec4748 Bug 1339540 part 2. Move the three ErrorResult-internal NS_ERROR_DOM_* values over to the ErrorResult error module. r=smaug 2017-02-15 00:02:35 -05:00
Boris Zbarsky ebf63a11ae Bug 1339540 part 1. Introduce an ErrorResult-specific nsresult module. r=smaug 2017-02-15 00:01:57 -05:00
Boris Zbarsky 9d04143631 Bug 1330699 part 1. Add a ClearElementAt API to nsTArray. r=froydnj 2017-02-14 23:59:59 -05:00
Nicholas Nethercote 334f89c567 Bug 1339327 (part 5) - Rename some profiler functions related to sleeping. r=mstange.
The new names make it clearer that these actions apply to just one thread.

- profiler_sleep_start() --> profiler_thread_sleep()
- profiler_sleep_end()   --> profiler_thread_wake()
- profiler_is_sleeping() --> profiler_thread_is_sleeping()
- GeckoProfilerSleepRAII --> GeckoProfilerThreadSleepRAII
- GeckoProfilerWakeRAII  --> GeckoProfilerThreadWakeRAII
2017-02-15 14:26:23 +11:00
Jeff Walden d7372e37d9 Bug 1338374 - Use alignas/alignof to define Variant's internal raw storage. r=froydnj
--HG--
extra : rebase_source : a75613ba7c17ceccf20e6f096a118bfedfa1eb15
2017-01-30 15:56:05 -08:00
JW Wang 51b91b868e Bug 1339677. Part 4 - check if mMutex.mLock is tampered. r=gerald
MozReview-Commit-ID: H37EnCF0V4w

--HG--
extra : rebase_source : 6637f059ab76317f05187c865faa7ea70d762609
extra : source : 2cf36fc3f2a191aafc3a0aca159ed0baf5d671af
2017-02-15 16:42:26 +08:00
JW Wang fd3595243f Bug 1339677. Part 3 - add some sanity checks. r=gerald
MozReview-Commit-ID: AXq9KQGKGni

--HG--
extra : rebase_source : e78a7339920605ee66e407e184582f80588646f8
extra : source : 53227d5296decb587aaf214c8f33875cdb2a6f2d
2017-02-16 11:43:46 +08:00
JW Wang 46381af26b Bug 1339677. Part 2 - some code cleanup and remove unnecessary scope qualifiers. r=gerald
MozReview-Commit-ID: 5h7Mv5joGHy

--HG--
extra : rebase_source : 0f81f34b6a7a78e1832c8c5e8f3f570e7e4719fc
extra : intermediate-source : 88dbebd4cfab00aa234b04c3d279ab1e3b82833f
extra : source : 66e5c1b54d22de67b9838afb790805ef8cf1f23e
2017-01-24 16:24:10 +08:00
JW Wang 51d90c702d Bug 1339677. Part 1 - assert DoResolveOrReject() is called on the target thread and use stronger assertions. r=gerald
MozReview-Commit-ID: I1wdNfjehTN

--HG--
extra : rebase_source : e1e3d336b3df10bd3257983a3d34275df0fe8048
extra : intermediate-source : fc357179510cd164c66a391ca67d6b32af85566c
extra : source : bcb07a4f12acb396406fec2d368507a45312ecfa
2017-01-24 16:13:23 +08:00
Sylvestre Ledru 5bedb078f1 Bug 1338086 - Remove useless else blocks in order to reduce complexity in xpcom/ r=froydnj
MozReview-Commit-ID: JUJARn5Nspp

--HG--
extra : rebase_source : c719d19215fb26ace822269c2a28faf5cf35ffbb
2017-02-09 15:31:35 +01:00
Tom Tromey d2667a2b27 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L

--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Tom Tromey 2c32a85186 Bug 1060419 - make nsDebugImpl.cpp use PrintfTarget, r=froydnj
MozReview-Commit-ID: DyxdtYwmaVW

--HG--
extra : rebase_source : ef976daab148286c4c77c98bdd7c4e9c02b2ee43
2016-12-13 16:05:54 -07:00
Tom Tromey dbba99687c Bug 1060419 - make xpcom/glue/nsDebug.h use Printf.h, r=froydnj
MozReview-Commit-ID: 3nau1fJbnuX

--HG--
extra : rebase_source : fee266790c1842818c8332c31e30fbee0ea3feb1
2016-12-09 10:50:37 -10:00
Tom Tromey 6ecf3cdfb2 Bug 1060419 - make nsEnvironment.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: 9GnlfmGm0LH

--HG--
extra : rebase_source : 2cbf3cccd3fd7b9584086a814a0f834267c5b2f9
2016-12-09 10:53:59 -10:00
Tom Tromey b18d4c7b9e Bug 1060419 - make TestPipes.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: LMFNBYVoJZf

--HG--
extra : rebase_source : fb47a1aaf1371797cdd131f9157f8fd1d8f06e26
2016-12-09 10:53:35 -10:00
Tom Tromey 7c2695d760 Bug 1060419 - make ManifestParser use Printf.h, r=froydnj
MozReview-Commit-ID: HBOOr5WScvU

--HG--
extra : rebase_source : 08a020f6c95cd662000e2ade4bcbae7f62bea165
2016-12-15 20:13:08 -07:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Tom Tromey f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
Tom Tromey 0b7fe52949 Bug 1060419 - remove SprintfState typedef; r=froydnj
MozReview-Commit-ID: 9ygDxy8pBLT

--HG--
extra : rebase_source : 88e1b16509d2d329e01518b06d2232b8422934b2
2017-01-13 14:54:14 -07:00
Bill McCloskey 70d043f2ab Bug 1337537 - Workarounds to avoid TabGroup assertions in edge cases (r=smaug)
MozReview-Commit-ID: LVTgyivcA7V
2017-02-13 17:03:03 -08:00
Bill McCloskey c6b9c4a0bf Bug 1337575 - Use SystemGroup for GC/CC (r=mccr8)
MozReview-Commit-ID: 9vLuFnuHS9U
2017-02-13 17:02:59 -08:00
Bill McCloskey 1ae37fef66 Bug 1337537 - Assert that runnables labeled with a given TabGroup never touch other TabGroups (r=ehsan)
MozReview-Commit-ID: sOdn9e5f57
2017-02-13 17:02:57 -08:00
Bill McCloskey e1b2f2ef09 Bug 1337537 - Make a SystemGroup singleton (r=ehsan)
MozReview-Commit-ID: Jnwrr49daeM
2017-02-13 17:02:52 -08:00
Bill McCloskey 9b20275aa5 Bug 1337537 - Move some TabGroup code to ValidatingDispatcher (r=ehsan)
MozReview-Commit-ID: EUqZKx2rAOt
2017-02-13 17:02:50 -08:00
Bill McCloskey bea9c4205c Bug 1337537 - Move Dispatcher.{cpp,h} to xpcom/threads (r=froydnj)
MozReview-Commit-ID: AYyKynUv4bX
2017-02-13 17:02:48 -08:00
Brian Hackett 01a649c197 Bug 1337112 - Remove links from JSRuntime to its single context and zone group, r=jandem,jonco.
--HG--
extra : rebase_source : ebf319af724d5f829cdf5c2386dc82d49be89989
2017-02-10 16:47:50 -07:00
Bevis Tseng 1ebeb1002b Bug 1333997 - Part 3: Add Test Coverage for Named NewRunnable APIs. r=froydnj
--HG--
extra : rebase_source : 7038228e2744072d1b64f903ab6ae9ca2f053bef
2017-02-07 16:45:45 +08:00
Bevis Tseng 2128d8e3a2 Bug 1333997 - Part 2: Overload the NewRunnable APIs with a 'Name' as 1st Parameter. r=froydnj
--HG--
extra : rebase_source : b7aaaf3acf2edd6cfaff467db6436d5f2d1addb0
2017-02-07 13:02:57 +08:00
Bevis Tseng a9f9ffc077 Bug 1333997 - Part 1: Add Type Aliases for NewRunnable Templates. r=froydnj
--HG--
extra : rebase_source : d2f41c2afd2da1a27b15d03be11f2d76c439734a
2017-02-06 18:08:01 +08:00
David Major 65625866dd Bug 1335896 - Shrink maxPatchedFns in WindowsDllInterceptor. r=aklotz
MozReview-Commit-ID: HLHC2l9ElA0
2017-02-10 14:20:43 +13:00
Vincent Lequertier 5864a38dc4 Bug 1329243 - Fix nsAdoptingString -Wextra copy constructor warning; r=froydnj
MozReview-Commit-ID: DEicxRecJUu

--HG--
extra : rebase_source : 612fa3d002ed906102ab24b3d338eb0087ca5f60
2017-01-23 20:50:01 +01:00
Michael Layzell 81d9f8ac2c Bug 1316696 - Eliminate ns{Fixed,}{C,}StringRepr from the rust bindings, r=froydnj for being the wrong commit backed out a=backout
MozReview-Commit-ID: AMwAUq82vMo
2017-02-08 16:18:58 -08:00
Wes Kocher 250e123173 Backed out changeset 4e259fa04f68 (bug 1316696) for asserts in DocAccessibleParent.cpp a=backout
MozReview-Commit-ID: Eo2Kbxoy1EN
2017-02-08 16:18:02 -08:00
Michael Layzell c3093f17b8 Bug 1316696 - Eliminate ns{Fixed,}{C,}StringRepr from the rust bindings, r=froydnj
MozReview-Commit-ID: AMwAUq82vMo
2017-02-08 14:17:42 -05:00
Olli Pettay 09f425273a Bug 1336957, use diagnostic assert for wrapper existence, r=baku 2017-02-08 15:21:05 +02:00
Nicholas Nethercote d6624d0e50 Bug 816598 - Add a memory reporter for the Gecko Profiler. r=mstange,jseward.
It's fairly straightforward, and measures the important parts of:

- Sampler, PseudoStack, ProfileBuffer, ThreadInfo.

- LUL, PriMap, SecMap

Coverage isn't perfect, but it gets the major things I found via DMD on Linux.

Example output in about:memory:

├──151.21 MB (49.73%) -- profiler
│  ├──141.49 MB (46.53%) ── lul
│  └────9.72 MB (03.20%) ── sampler

--HG--
extra : rebase_source : 67d2ada42aead43f68f5100a08204a1d1f1cfceb
2017-01-30 12:37:26 +11:00
Sebastian Hengst 0264cdf6be Bug 1336311 - Change code comments with http://hg.mozilla.org to https://. r=gps
For components also referencing it in code, see the blockers of bug 1336311.

MozReview-Commit-ID: 4tUZ24HKBWy

--HG--
extra : rebase_source : ec16149f525b9b7eaca7f96f1369929d21497121
2017-02-07 17:52:56 +01:00
Carsten "Tomcat" Book 092e5dc5f1 merge mozilla-inbound to mozilla-central a=merge 2017-02-07 14:08:46 +01:00
Wes Kocher 2c901c4bcb Merge m-c to inbound, a=merge
MozReview-Commit-ID: FrOiBMr2DHX
2017-02-06 17:51:48 -08:00
Honza Bambas 3a39b6dbee Bug 1322825 - Incremental tokenizer. r=froydnj 2017-02-06 10:49:00 -05:00
Gerald Squelart 213ba5c515 Bug 1336215 - Optimize iterator if nsDeque is const - r=froydnj
Handling potential nsDeque size changes means a bit of extra work.

But if the nsDeque is const, we can assume that it shouldn't get modified, so
we can provide a more optimized iterator that doesn't need to handle size
changes.

Optimizing a range-for loop in which the deque is not modified, can be done
by writing: `for (void* item : const_cast<const nsDeque&>(deque)) {...}`

MozReview-Commit-ID: AFupjoTsoH3

--HG--
extra : rebase_source : a71b09c9cb73787ce686c7c762f92ef0c208e76a
2017-02-03 13:08:10 +11:00
Gerald Squelart dade4b9e6e Bug 1336215 - Make nsDeque::ConstIterator resistant to size changes - r=froydnj
Note that iterators stay at the same index if the deque size changes
(including end-iterators staying at the end).
This means that after front operations, iterators will effectively point at
different elements! (Possibly skipping or re-visiting some.)
But this is consistent with ForEach and hand-crafted index-based for loops.

MozReview-Commit-ID: 5IvazJR68dG

--HG--
extra : rebase_source : c574fd2d2642d784482698c0fc861269200d1059
2017-02-03 09:19:47 +11:00
Gerald Squelart d109b21181 Bug 1336215 - More complete and consistent nsDeque doc, deleted special copy members - r=froydnj
MozReview-Commit-ID: GvjFPiX6lii

--HG--
extra : rebase_source : 1ffc8392106757743f0718aa5cf68d03aa16e384
2017-02-03 12:43:13 +11:00
Byron Campen [:bwc] 276d12bcef Bug 1328643: Add some locking to prevent races caused by Cancel/Init from threads other than the target. r=froydnj
MozReview-Commit-ID: FdAPTGDNKup

--HG--
extra : rebase_source : f0b04c73f0867708750fb9022e07f929ec221e84
2017-01-11 13:59:19 -06:00
Jean-Yves Avenard c64edca1b9 Bug 1319987: P4. Refactor H264 Converter. r=cpearce
We can make some assumptions now that the Input method is only called once and never again while a decode is pending.

MozReview-Commit-ID: EmzKEcwNY2J

--HG--
extra : rebase_source : 42ae59878962b425970a60abe25d98c023ef4fdf
2016-12-30 21:51:42 +11:00
Nathan Froyd 168a1fcbdc Bug 1336086 - remove mozilla::services::_external_Get*Service; r=bsmedberg,jesup
Removing the exported symbols is straightforward enough.

The only wrinkle is that PeerConnectionCtx.cpp gets compiled with and
without MOZILLA_INTERNAL_API.  When compiling without
MOZILLA_INTERNAL_API, mozilla::services::Get*Service was redirected to
the _external_* symbol variants.  But as the _external_* symbols no
longer exist, PeerConnectionCtx.cpp's code no longer worked.

Fortunately, PeerConnectionCtx.cpp already contains a few #ifdef
MOZILLA_INTERNAL_API blocks to handle internal/external compilation;
fixing this newest issue was just a matter of extending existing blocks
and adding new ones.  The key observation is that we never added any
observers when compiling without MOZILLA_INTERNAL_API, so we can #ifdef
out the removals of observers, as those would have no effect, and simply
skip getting the observer service for the observer additions if we're
compiling without MOZILLA_INTERNAL_API.
2017-02-03 11:52:02 -05:00
Gerald Squelart d5ce43788f Bug 1322700 - Enable range-for with nsDeque - r=froydnj
It's now possible to write:
  for (void* item : deque) { ... }

MozReview-Commit-ID: FLoczCZd77y

--HG--
extra : rebase_source : 237293e94b478beb2bf352c1179d42c289dda145
2017-02-02 12:28:35 +11:00
Tom Tromey ada066d0b0 Bug 1324434 - remove JS_GetCurrentEmbedderTime in favor of TimeStamp; r=sfink
MozReview-Commit-ID: CG0MidpH8k3

--HG--
extra : rebase_source : 1facc7347c19d9975bbeb168166ddd4c7de4545b
2016-12-19 08:23:59 -07:00
Andrew McCreight 3dacb601cf Bug 1333974, part 1 - Add new API for releasing on main thread using the system group. r=froydnj
MozReview-Commit-ID: KP71tgpaXaY

--HG--
extra : rebase_source : c2cd25ee412748d47ed0953e2766fa8f40505d59
2017-01-31 11:35:10 -08:00
Carsten "Tomcat" Book 72823b1e95 merge mozilla-inbound to mozilla-central a=merge 2017-02-02 14:25:20 +01:00
Wes Kocher f5eab47fb9 Merge m-c to autoland, a=merge
MozReview-Commit-ID: HVH8TbXbw7N
2017-02-01 16:30:50 -08:00
Michael Layzell 0dadca05f7 Bug 1335203 - Synchronize rust debug-assertions with C++ DEBUG, r=froydnj
MozReview-Commit-ID: JPD9eNFg89S
2017-02-01 13:54:22 -05:00
Chris Manchester 0aa1979e85 Bug 1333135 - Install test programs from xpcom/tests with moz.build rather than Makefile.in. r=mshal
MozReview-Commit-ID: AeJHDn2znAk

--HG--
extra : rebase_source : 81cbc9e0231668e3cdee9f5579dbbe6a48374b97
2017-01-27 13:57:04 -08:00
Jorg K 22cddce9af Bug 1335854 - Tone down non-zero refcount message for dynamic atoms. r=froydnj
--HG--
extra : rebase_source : 31bef82b308fc5f7bd4eebbf898820e0b10640c0
2017-02-01 11:47:00 -05:00
Chris Pearce 701e1daf19 Bug 1332530 - Move GMPLoader code out of plugin-container and back into XUL. r=gerald
The GMPLoader code was in plugin-container so that it was covered by
Adobe's voucher of plugin-container, but that's no longer necessary.

MozReview-Commit-ID: 3VRBAohRI9I

--HG--
extra : rebase_source : 58a30855ade14af4c4b1420edabd3abb398f232e
2017-01-19 15:39:03 +13:00
Wes Kocher e457683b2d Merge m-c to autoland, a=merge
MozReview-Commit-ID: BipzgOEInZh
2017-01-30 15:54:34 -08:00
Wes Kocher 584127af5f Merge inbound to central, a=merge
MozReview-Commit-ID: 4GYZ5Pzy7BY
2017-01-30 15:44:58 -08:00
Emilio Cobos Álvarez 0a5eaecfac Bug 1335204: Remove DEBUG-only ifdef for Gecko_IncrementStringAdoptCount. r=mystor
MozReview-Commit-ID: KhwAxk1fHUn

--HG--
extra : rebase_source : 80d844bf069ae09f0a9588d93fd49c57a3725c52
2017-01-30 23:17:19 +01:00
Sebastian Hengst dcd9914458 Backed out changeset c8fe57b085bd (bug 1333631) 2017-01-30 23:17:34 +01:00
Benjamin Smedberg ca77995f5d Bug 1333826 - Remove SDK_FILES, SDK_LIBRARY, and related is_sdk support in the build goop, r=mshal
MozReview-Commit-ID: 52vPyDXdFte

--HG--
extra : rebase_source : c3217730bb70eb7319152dd07536b12f49d6a597
2017-01-30 11:24:10 -05:00
Masatoshi Kimura 835c70f82e Bug 1333631 - Disallow nsIFile::GetNativeTarget on Windows. r=froydnj
MozReview-Commit-ID: 4igXHPtQu4x

--HG--
extra : rebase_source : b65e458521270500a7f9054d63ee17d162918402
2017-01-25 23:36:50 +09:00
Phil Ringnalda 5d4072a82c Merge m-i to m-c, a=merge 2017-01-28 13:09:00 -08:00
Emilio Cobos Álvarez c7cae408eb Bug 1334579: Integrate nsstring bindings with leak logging. r=mystor
MozReview-Commit-ID: 368DwwuaMqr

--HG--
extra : rebase_source : e8e2149ca7169556df668615d654423ae9080097
2017-01-27 21:12:22 +01:00
Sebastian Hengst f679eaafc6 Backed out changeset 558774589f3e (bug 1330326) for Windows build bustage in nsTSubstring.h. r=backout on a CLOSED TREE 2017-01-27 21:00:49 +01:00
Gian-Carlo Pascutto 305eb7cc8b Bug 1330326 - Add Split() function on String classes. r=froydnj
MozReview-Commit-ID: 3xug2xMR60j

--HG--
extra : rebase_source : 60a9e37c2c7727eb6fbd69bfeee0f1292a0d880e
2017-01-24 12:07:00 +01:00
David Anderson 1a407d3a95 Add GPU process support to nsMemoryReportingManager. (bug 1321492 part 7, r=erahm) 2017-01-26 16:35:55 -08:00
David Anderson 23572be8d6 Add memory reporting message support to PGPU. (bug 1321492 part 6, r=rhunt, r=erahm) 2017-01-26 16:35:54 -08:00