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

3601 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey c1becb4a54 Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj
At the same time, remove the MOZ_STATIC_ASSERT_VALID_ARG_COUNT, which
doesn't actually work for more than 50 arguments(*), and which is now not
useful to detect 0 arguments.

(*) the build fails, but not directly thanks to the static_assert it
expands to.

--HG--
extra : rebase_source : 8f0fe7b352c89b5a3ec87f42ef5464c370c362ef
2017-05-25 15:47:21 +09:00
Andrew McCreight e437a7e4e5 Bug 1367496 - Add more release asserts to the cycle collector. r=smaug
A previous bug missed a few places where we could theoretically
reenter the CC.

MozReview-Commit-ID: I0otlAEwyZa

--HG--
extra : rebase_source : 064b127a2c28a52b2807cd78031de9af4f258f60
2017-05-24 10:13:02 -07:00
Jim Chen 14dbe23a6c Bug 1360321 - 6. Add AArch64 support in xpcom; r=froydnj
Add breakpoint support for AArch64, and fix a scanf format specifier
warning. Also fix an #if line in xptcinvoke_arm.cpp to work as intended.

MozReview-Commit-ID: BSjYVD8Zq0t
2017-05-17 13:06:23 -04:00
Mike Hommey 02a06f7958 Bug 1363992 - Remove support for making jemalloc4 the default. r=njn
--HG--
extra : rebase_source : 77e1c13aa329637d0ec875439d572ee06e6919fa
2017-05-11 13:16:00 +09:00
Steve Fink 251223d923 Bug 1364161 - Emit a major GC marker for the end of a major GC, and a slice marker for the end of a slice, instead of the other way around, r=mstange
MozReview-Commit-ID: 337I7TeN8tQ

--HG--
extra : rebase_source : 68725645926fbf9662c45bf6fa13ba02c25d8894
2017-05-12 17:42:43 -07:00
Andrew McCreight bc3190039b Bug 1364528 - Don't synchronously finalize native objects if an exception is pending. r=smaug
MozReview-Commit-ID: 6OY3ftH1aWu

--HG--
extra : rebase_source : 54da36f422af673762aa31e5a1225783e5f776e4
2017-05-12 11:16:16 -07:00
Ehsan Akhgari 8a04849cee Bug 1362814 - Part 2: Move GeckoProfilerReporter to its own header; r=mstange
This allows us to get rid of the nsIMemoryReporter.h inclusion in GeckoProfiler.h.
That brings XPCOM string headers with it.
2017-05-12 02:35:09 -04:00
Carsten "Tomcat" Book 455239782b Merge mozilla-central to mozilla-inbound 2017-05-10 15:30:44 +02:00
Carsten "Tomcat" Book d66b9f27d5 merge mozilla-inbound to mozilla-central a=merge 2017-05-10 15:07:28 +02:00
kedziorski.lukasz@gmail.com f815a0af4b Bug 1359436 - Add leak checking to CycleCollectedJSContext and related classes. r=mccr8 2017-05-09 13:59:00 +02:00
Xidorn Quan fa9c49fce4 Bug 1330235 - Remove NS_STDCALL_FUNCPROTO and replace its usage with decltype. r=froydnj
MozReview-Commit-ID: 5jrTqTfDzSk

--HG--
extra : rebase_source : e2345a4f518757ed9760618d07599a60353875cc
2017-05-09 23:00:37 +10:00
Franziskus Kiefer 647c94e8af Bug 1359335 - collect telemetry on aes-ni support, r=gfritzsche
MozReview-Commit-ID: 23YbAcCls1H

--HG--
extra : rebase_source : e70869f3cb88052cb756649e4581f6690363acfe
2017-03-31 19:03:03 +02:00
Wes Kocher f5ba7a67d6 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9QuGHXqdxTb
2017-05-08 16:14:34 -07:00
Tom Tromey aa6e054b71 Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj
This annotates vsprintf-like functions with MOZ_FORMAT_PRINTF.  This may
provide some minimal checking of such calls (the GCC docs say that it
checks for the string for "consistency"); but in any case shouldn't
hurt.

MozReview-Commit-ID: HgnAK1LiorE

--HG--
extra : rebase_source : 9c8d715d6560f89078c26ba3934e52a2b5778b6a
2017-05-04 12:10:19 -06:00
Steve Fink 7ef280069e Bug 1322560 - Record minor GC timings in profiles, r=jonco, mccr8, mstange
--HG--
extra : rebase_source : 073eceb4216b0505f8cbce0947e3e5091626ead1
2017-04-25 13:24:34 -07:00
Steve Fink 4b00aab714 Bug 1322560 - Inject detailed GC timing info into profiles, r=mstange
--HG--
extra : rebase_source : fdd7f21bbb783ee759d3b0b614264d078fa2213f
extra : source : 5fe280e53d4f474f5f16ff834e0b9cf55745d746
2017-05-02 16:13:49 -07:00
Olli Pettay 0096f25b51 Bug 1358761 - replace PurpleBlock with SegmentedVector to reduce indirect memory accesses when calling suspect, r=mccr8,nfroyd
--HG--
extra : rebase_source : e74be6bfb9efbba9361d2ce3c22518379a332200
2017-05-05 00:49:22 +03:00
Patrick McManus 72b59b72e3 Bug 1361601 - Remove nsSystemInfo.getProperty("host") r=froydnj
See also bug 1361495 - PR_SI_HOSTNAME is implemented in NSPR on
Windows as initializing winsock which can be janky. There don't seem
to be any users of this property, and it has tracker concerns anyhow -
so remove it.

MozReview-Commit-ID: S2AwzMUgYk

--HG--
extra : rebase_source : 552bed219913f40c002b807be3239d4666a5284b
2017-05-02 16:54:46 -04:00
Bill McCloskey 34a4f034bb Bug 1359245 - Remove references to context from the cycle collector (r=mccr8)
MozReview-Commit-ID: 1QoNEiZMvBf
2017-04-27 15:34:46 -07:00
Bill McCloskey 9862d9c932 Bug 1359245 - Remove some tracing callbacks at shutdown (r=mccr8)
When we just had CycleCollectedJSContext (and no CycleCollectedJSRuntime) a
weird thing happened at shutdown:
1. We would call JS_DestroyContext from ~CycleCollectedJSContext. By that time,
   the ~XPCJSContext destructor had already finished.
2. Destroying the context runs a final GC. That GC would call back into various
   GC callbacks, such as TraceBlackJS and TraceGrayJS.
3. These callbacks would do a virtual method call:
   http://searchfox.org/mozilla-central/rev/876c7dd30586f9c6f9c99ef7444f2d73c7acfe7c/xpcom/base/CycleCollectedJSRuntime.cpp#791
4. Normally this method call would call into
   XPCContext::TraceNativeBlackRoots. However, C++ changes the vtable for an
   object during destruction. So we would only call CycleCollectedJSContext's
   version of TraceNativeBlackRoots, which is empty. So we never traced anything.

When I moved this code into the runtime, we actually do call into
XPCJSRuntime::TraceNativeBlackRoots at that time. So the behavior changed, and
that was causing crashes once I nulled out the TLS as you asked. So I removed
these callbacks for the last GC.

MozReview-Commit-ID: 3do13bjpwQj
2017-04-27 15:34:46 -07:00
Bill McCloskey 1d5c5ef48b Bug 1359245 - Keep a linked list of CycleCollectedJSContexts in the runtime (r=mccr8)
This patch keeps a list of all the cooperatively scheduled contexts that are
linked to a runtime. In places where we need to iterate over all contexts (for
GC, specifically), it iterates over the list.

MozReview-Commit-ID: 3pKJX78f2l0
2017-04-27 15:34:46 -07:00
Bill McCloskey 267ad1f2b0 Bug 1359245 - Initial support for cooperative contexts (r=mccr8)
This patch adds initial support for cooperatively scheduled
CycleCollectedJSContexts.

MozReview-Commit-ID: 5pfPubHUanL
2017-04-27 15:34:46 -07:00
Bill McCloskey ee9f642133 Bug 1359245 - Remove CycleCollectedJSRuntime::mJSContext (r=mccr8,sfink)
This patch eliminates a field where we assume that there is one
CycleCollectedJSContext per runtime.

MozReview-Commit-ID: 5cEL5Ml6Y9v
2017-04-27 15:34:46 -07:00
Bill McCloskey 11b1f07146 Bug 1359245 - Get rid of CycleCollectedJSRuntime::MainContext (r=mccr8)
This is another method that assumes one context per runtime. This patch
eliminates the method.

MozReview-Commit-ID: JHcQ1nyiHSP
2017-04-27 15:34:46 -07:00
Michael Layzell 8b7ba021a4 Bug 1339537 - Part 6: Pass std::function values tree by const reference instead of by value, r=ehsan
MozReview-Commit-ID: PVAqU2DPs2
2017-04-27 12:44:57 -04:00
Petr Sumbera 0ffb4d0cd2 Bug 1359841 - xpcom/base/nsStatusReporterManager.cpp should cast getpid() return value to int. r=alchen 2017-04-26 08:05:20 -07:00
Wes Kocher c90904f9bf Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 9HQViJrDT6S
2017-04-26 17:30:31 -07:00
Nathan Froyd 8bbd081c88 Bug 1359415 - move threadsafety checks inside nsAutoOwningThread; r=erahm
This change moves most of the logic for the threadsafety check into
nsAutoOwningThread, rather than having part of the logic live in
nsAutoOwningThread and part of the logic live in nsDebug.h.  Changing
this also forces us to clean up a couple of places that replicated the
logic that lived in nsDebug.h as well.
2017-04-26 11:41:32 -04:00
Jon Coppeard eb3c9870bf Bug 1352430 - Add barrier to wrapper cache to clear dying objects that have not yet been finalized r=bz r=sfink
* * *
Code review followup

--HG--
extra : rebase_source : 10c1fd603c2dd1ac2ff5770ae9aec2e9131681ce
2017-04-26 11:18:39 +01:00
Tom Tromey 99f4608655 Bug 1334278 - change mozilla::Smprintf to return a UniquePtr; r=froydnj
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management.  (Though after this patch there are
still a handful of spots needing SmprintfFree.)

MozReview-Commit-ID: COa4nzIX5qa

--HG--
extra : rebase_source : ab4a11b4d2e758099bd0794d5c25d799a7e42680
2017-03-03 08:17:27 -07:00
Edouard Oger 73ec204121 Bug 1349299 - Register device on FxA even on Push registration failure. r=Grisha
MozReview-Commit-ID: 3qDkm9iV9C0

--HG--
extra : rebase_source : 907538907f43fb911ad28222ceecdc38fb2feb24
2017-04-06 11:30:23 -04:00
Nicolas B. Pierron 49b55aae35 Bug 900784 part 1.0 - Add nsJSUtils functions for encoding and decoding the bytecode. r=mrbkap 2017-04-21 16:57:57 +00:00
Bill McCloskey 207af130a2 Bug 1343396 - Split CycledCollectedJSContext and XPCJSContext into separate context and runtime classes (r=mccr8)
To run JS in separate cooperative threads, we need to split up per-thread state
from per-runtime state. This patch does that for XPConnect.

MozReview-Commit-ID: 407SlJ7nR6v
2017-04-18 17:01:04 -07:00
Luke Wagner c39bb259da Bug 1356631 - Change LargeAllocationCallback to be process-wide (r=mccr8)
This is necessary to allow helper threads to attempt large allocations and recover from fragmentation situations with the LargeAllocationFailureCallback.

MozReview-Commit-ID: AyA3pbXcaYy

--HG--
extra : rebase_source : 7a5feb779b690ec7f123481e76f2390c850dac91
2017-04-17 21:19:54 -05:00
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
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
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
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
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 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
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
Carsten "Tomcat" Book 68008bab43 Backed out changeset a52e75fdda07 (bug 1277709) for 10.10 xpcshell failures 2017-04-04 09:55:54 +02: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
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
Iris Hsiao a4e80da339 Backed out changeset 40eb77a98bcf (bug 1300152) 2017-03-31 13:47:37 +08:00