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
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
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
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
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
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
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
Jan de Mooij
a53986bf29
Bug 1302448 part 1 - Rename CycleCollectedJSRuntime to CycleCollectedJSContext. r=mccr8
...
--HG--
rename : xpcom/base/CycleCollectedJSRuntime.cpp => xpcom/base/CycleCollectedJSContext.cpp
rename : xpcom/base/CycleCollectedJSRuntime.h => xpcom/base/CycleCollectedJSContext.h
extra : rebase_source : 075214b5057f151520926715b6154e99ae80a0b3
2016-09-14 15:47:32 +02:00
Terrence Cole
6af2f7d660
Bug 1257387 - Move OOM callback annotation to the common runtime for workers; r=mccr8
...
--HG--
extra : rebase_source : 3278a5bc32ce245003b890fbfbbf4f32e3d42944
2016-09-13 10:57:07 -07:00
Nicholas Nethercote
34dcc7b852
Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
...
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.
In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.
> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.
> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");
This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
be true" sense used in assertions.
A common variation on the side-effect-free case is the following.
> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");
--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Olli Pettay
8744d0ccf8
Bug 1298661, let meta-stable state runnables run during sync loops, r=baku
2016-09-05 18:54:04 +03:00
Andi-Bogdan Postelnicu
390ab815ab
Bug 1282408 - add ignore initialization check flag for mAnyMarked in FixWeakMappingGrayBitsTracer. r=froydnj
...
MozReview-Commit-ID: 4DrIUUf4tuk
2016-08-24 10:58:37 +03:00
Sebastian Hengst
7422ce2634
Backed out changeset 31b56ae647c8 (bug 1110928)
2016-08-21 12:27:47 +02:00
Andrew McCreight
a0ddf20ce7
Bug 1110928, part 4 - Try to pass a relevant zone to PokeGC. r=smaug
...
This means the browser will do less full GCs.
MozReview-Commit-ID: BXf4GGhmbMx
2016-08-19 15:26:56 -07:00
Igor
175543fda8
Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj
2016-08-14 23:43:21 -07:00
Igor
a57972337d
Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj
2016-08-14 23:44:00 -07:00
Jan de Mooij
0ad12515f4
Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru
2016-08-11 14:39:22 +02:00
Jan de Mooij
c7e88a5ad8
Bug 1286795 part 6 - Replace JS_NewRuntime/JS_DestroyRuntime with JS_NewContext/JS_DestroyContext. r=luke,bz
2016-07-23 19:54:19 +02:00
Jan de Mooij
fd0edec3bf
Bug 1286795 part 4 - Change some callbacks to take JSContext instead of JSRuntime. r=terrence
2016-07-23 19:52:47 +02:00
Jan de Mooij
1b710973b8
Bug 1286795 part 1 - Change more GC APIs to take JSContext instead of JSRuntime. r=terrence
2016-07-23 19:51:23 +02:00
Boris Zbarsky
eb139d85bf
Bug 1279313 part 1. Simplify AutoEntryScript to not make callers pass in a JSContext. r=bholley
2016-07-07 20:08:25 -04:00
Jan de Mooij
900af968f3
Bug 1283855 part 28 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence
...
--HG--
extra : rebase_source : c2d35b5d45cad074b9a9a144bc25ea4a32b8b246
2016-07-07 09:56:09 +02:00
Jan de Mooij
7ec38687c8
Bug 1283855 part 27 - Make more GC APIs take JSContext instead of JSRuntime. r=jonco
...
--HG--
extra : rebase_source : b666bd88d0247b58f7311f81e5116199779cc806
2016-07-07 09:55:45 +02:00
Jan de Mooij
1ffe7cc891
Bug 1283855 part 26 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence,mccr8
...
--HG--
extra : rebase_source : 68e6c63b179094f2441f01df58e0bdd68620ed09
2016-07-07 09:55:41 +02:00
Jan de Mooij
cd41339786
Bug 1283855 part 24 - Make js::DumpHeap take JSContext instead of JSRuntime. r=sfink
2016-07-06 11:40:20 +02:00
Jan de Mooij
28662f4214
Bug 1283855 part 23 - Make more callback setters take JSContext instead of JSRuntime. r=evilpie
2016-07-06 11:40:20 +02:00
Jan de Mooij
79865aba2a
Bug 1283855 part 17 - Make {Get,Set}DebuggerMallocSizeOf take JSContext instead of JSRuntime. r=jimb
2016-07-06 11:40:20 +02:00
Jan de Mooij
c1ed92b71b
Bug 1283855 part 3 - Make some callback setters take JSContext instead of JSRuntime. r=efaust
2016-07-06 11:40:20 +02:00
Nathan Froyd
2c2b9296bc
Bug 1283616 - part 2 - micro-optimize inserting microtask runnables into the queue; r=khuey
...
We can save an AddRef/Release pair by passing in the reference to the queue.
2016-07-05 18:49:06 -04:00
Jan de Mooij
4ca08a4466
Bug 1283855 part 15 - Make {Get,Set}DOMCallbacks, SetWindowProxyClass take JSContext instead of JSRuntime. r=h4writer
2016-07-05 14:35:28 +02:00
Jan de Mooij
fb15cb143c
Bug 1283855 part 14 - Make more callback setters take JSContext instead of JSRuntime. r=shu
2016-07-05 14:35:26 +02:00
Jan de Mooij
c8334f438a
Bug 1283855 part 12 - Make some GC APIs take JSContext instead of JSRuntime. r=sfink
2016-07-05 14:35:21 +02:00
Jan de Mooij
4ba1239131
Bug 1283855 part 11 - Make some GC callback APIs take JSContext instead of JSRuntime. r=terrence,mccr8
2016-07-05 14:35:19 +02:00
Jan de Mooij
185fef3784
Bug 1283855 part 10 - Make some GC callback APIs take JSContext instead of JSRuntime. r=jonco
2016-07-05 14:35:16 +02:00
Jan de Mooij
b6c8bdd67a
Bug 1283855 part 9 - Make asm.js/buildId op setters take JSContext instead of JSRuntime. r=bbouvier
2016-07-05 11:06:06 +02:00
Jan de Mooij
31f7512e9f
Bug 1283855 part 5 - Make warning reporter APIs take JSContext instead of JSRuntime. r=arai
2016-07-05 11:06:05 +02:00
Jan de Mooij
7c1a1cec44
Bug 1283855 part 2 - Make some callback setters take JSContext instead of JSRuntime. r=luke
2016-07-05 11:06:05 +02:00
Till Schneidereit
14a62c9039
Bug 911216 - Part 27: Properly set up incumbent and current globals for Promise reaction jobs. r=efaust,bz
2016-07-02 02:00:47 +02:00
Boris Zbarsky
759bad9a0b
Bug 767938 part 11. Move the "safe JS context" to where it belongs: the CycleCollectedJSRuntime. r=bholley
2016-06-24 14:19:51 -04:00
Wei-Cheng Pan
ba7d93dbef
Bug 1261143 - Hack recursion depth in metastable state for Mac OS. r=khuey
2016-06-20 23:11:00 +02:00
Till Schneidereit
b0d2250794
Bug 911216 - Part 24: Use promise rejection tracking to report unhandled rejections to the console. r=bz,Paolo
2016-03-22 16:22:24 +01:00
Jan de Mooij
8c1aaa3154
Bug 1278947 part 1 - Stop using JSContext callback in XPConnect. r=bz
...
--HG--
extra : rebase_source : 1e971a2a2a2a2b9068bd59d98156fa84b8f4b105
2016-06-10 09:27:14 +02:00
Nicholas Nethercote
5592622f09
Bug 1277104 - Add strings to high-frequency MOZ_CRASH() occurrences. mccr8.
...
Some of these are guesses; it's not always clear from a crash report stack
trace which MOZ_CRASH() was hit.
2016-06-09 13:09:58 +10:00
Jan de Mooij
dad997a833
Bug 1277278 part 3 - Rename error reporter callback to warning reporter, assert it's only used for warnings. r=luke
...
--HG--
extra : rebase_source : ac1febc5220d649853f35c29de89a5e9ffb4fe98
2016-06-07 20:30:48 +02:00
Boris Zbarsky
89b93668b8
Bug 1276112. Stop using GetScriptContextFromJSContext in CycleCollectedJSRuntime::UsefulToMergeZones. r=mccr8
2016-05-27 13:28:26 -04:00
Carsten "Tomcat" Book
81eb193787
Backed out changeset e8af287d0d10 (bug 1276112) for causing windows gl crashes
2016-05-30 10:29:44 +02:00