[email protected]
af7965b07d
Bug 1359436 - Add leak checking to CycleCollectedJSContext and related classes. r=mccr8
2017-05-09 13:59:00 +02:00
Steve Fink
7c0c4ef112
Bug 1322560 - Record minor GC timings in profiles, r=jonco, mccr8, mstange
2017-04-25 13:24:34 -07:00
Steve Fink
ccdbf25343
Bug 1322560 - Inject detailed GC timing info into profiles, r=mstange
2017-05-02 16:13:49 -07:00
Bill McCloskey
122ab6031e
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
8830029ed4
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
99b84aa84e
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
35b88671ac
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
48dadf1863
Bug 1352430 - Add barrier to wrapper cache to clear dying objects that have not yet been finalized r=bz r=sfink
...
* * *
Code review followup
2017-04-26 11:18:39 +01:00
Bill McCloskey
612db5fd30
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
b402a91ead
Bug 1302448 part 1 - Rename CycleCollectedJSRuntime to CycleCollectedJSContext. r=mccr8
2016-09-14 15:47:32 +02:00
Terrence Cole
ed6cbf49d1
Bug 1257387 - Move OOM callback annotation to the common runtime for workers; r=mccr8
2016-09-13 10:57:07 -07:00
Nicholas Nethercote
b5810a1eb4
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");
2016-09-02 17:12:24 +10:00
Olli Pettay
f0930f685c
Bug 1298661, let meta-stable state runnables run during sync loops, r=baku
2016-09-05 18:54:04 +03:00
Andi-Bogdan Postelnicu
6e3ca9cbda
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
d798737bea
Backed out changeset 31b56ae647c8 (bug 1110928)
2016-08-21 12:27:47 +02:00
Andrew McCreight
e2bdd91026
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
9c81c3c1ee
Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj
2016-08-14 23:43:21 -07:00
Igor
972b8460e2
Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj
2016-08-14 23:44:00 -07:00
Jan de Mooij
bd0f1c9018
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
7ff36899cf
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
705fa31f27
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
46f069e1c0
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
c3889c8b5d
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
7c3e2f8f9a
Bug 1283855 part 28 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence
2016-07-07 09:56:09 +02:00
Jan de Mooij
a3ac62d76c
Bug 1283855 part 27 - Make more GC APIs take JSContext instead of JSRuntime. r=jonco
2016-07-07 09:55:45 +02:00
Jan de Mooij
43c0eb9efc
Bug 1283855 part 26 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence,mccr8
2016-07-07 09:55:41 +02:00
Jan de Mooij
cf74d14bbc
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
706da291dc
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
23850549c8
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
401124ffae
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
68a263d7f1
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
69cde12162
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
232d17e931
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
22f78cde9e
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
24d5a9da4c
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
7db749e17a
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
70b39b7234
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
31bd9d01bb
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
97cade1c39
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
705a5e099f
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
78942677dd
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
dd842cae97
Bug 1261143 - Hack recursion depth in metastable state for Mac OS. r=khuey
2016-06-20 23:11:00 +02:00
Till Schneidereit
4f5be3e505
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
584e74df80
Bug 1278947 part 1 - Stop using JSContext callback in XPConnect. r=bz
2016-06-10 09:27:14 +02:00
Nicholas Nethercote
9165c82198
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
776a5c9ce9
Bug 1277278 part 3 - Rename error reporter callback to warning reporter, assert it's only used for warnings. r=luke
2016-06-07 20:30:48 +02:00
Boris Zbarsky
717825d485
Bug 1276112. Stop using GetScriptContextFromJSContext in CycleCollectedJSRuntime::UsefulToMergeZones. r=mccr8
2016-05-27 13:28:26 -04:00
Carsten "Tomcat" Book
a96c2797f7
Backed out changeset e8af287d0d10 (bug 1276112) for causing windows gl crashes
2016-05-30 10:29:44 +02:00
Boris Zbarsky
c578ffd08f
Bug 1276112. Stop using GetScriptContextFromJSContext in CycleCollectedJSRuntime::UsefulToMergeZones. r=mccr8
2016-05-27 13:28:26 -04:00
Till Schneidereit
987d271b83
Bug 911216 - Part 13: Set Promise allocation stack as async stack for Promise callback jobs. r=efaust,bz
2016-03-22 16:22:23 +01:00