Commit Graph

98 Commits

Author SHA1 Message Date
Jon Coppeard
c40a640555 Bug 1605348 - Only trace the target of a WeakRef if the tracer requests weak edges r=sfink
The problem is the compartment checking tracer currently gets to see the target of a WeakRef, which may be in another compartment. I updated the trace method to check the traceWeakEdges() flag and set this to false for the GCMarking tracer. I was surprised that this wasn't the case before but I did a try run and everything looks fine.

Differential Revision: https://phabricator.services.mozilla.com/D57962

--HG--
extra : moz-landing-system : lando
2020-01-02 11:02:31 +00:00
Ted Campbell
736ef5b81f Bug 1603845 - Fix clang-format issues in js/ r=iain
Differential Revision: https://phabricator.services.mozilla.com/D57163

--HG--
extra : moz-landing-system : lando
2019-12-13 21:35:17 +00:00
Jeff Walden
e544e8f369 Bug 1603256 - Convert |JS::UnsafeTraceRoot| from a template to separate function overloads. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D56807

--HG--
extra : moz-landing-system : lando
2019-12-12 23:44:23 +00:00
Jeff Walden
4a33f58e01 Bug 1603256 - Convert |js::gc::TraceExternalEdge| from a template to separate function overloads. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D56806

--HG--
extra : moz-landing-system : lando
2019-12-12 23:43:32 +00:00
Jeff Walden
356dfe7d19 Bug 1603256 - Define |js::UnsafeTraceManuallyBarrieredEdge| as not a template function, and only for the single |JSObject*| GC type that needs it. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D56805

--HG--
extra : moz-landing-system : lando
2019-12-12 23:43:23 +00:00
Steve Fink
be9b7d8e1a Bug 1597206 - Refactor GCMarker state management r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54579

--HG--
extra : moz-landing-system : lando
2019-12-02 18:25:14 +00:00
Noemi Erli
b1b72f10cb Backed out 3 changesets (bug 1597206) as requested by sfink
Backed out changeset 334b41001234 (bug 1597206)
Backed out changeset e372ae10adb5 (bug 1597206)
Backed out changeset c82b377fbbde (bug 1597206)
2019-11-28 07:47:37 +02:00
Steve Fink
6632830564 Bug 1597206 - Refactor GCMarker state management r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54579

--HG--
extra : source : e372ae10adb5880afcf820a51ff3bdd559269b76
2019-11-28 00:49:37 +00:00
Noemi Erli
a92ab3648c Backed out 3 changesets (bug 1597206) for causing assersions in GC.cpp
Backed out changeset 334b41001234 (bug 1597206)
Backed out changeset e372ae10adb5 (bug 1597206)
Backed out changeset c82b377fbbde (bug 1597206)
2019-11-28 04:45:55 +02:00
Steve Fink
a7ed1794d7 Bug 1597206 - Refactor GCMarker state management r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54579

--HG--
extra : moz-landing-system : lando
2019-11-28 00:49:37 +00:00
Yoshi Cheng-Hao Huang
12589797cc Bug 1573809 - Part 6 : GCHashmap/GCHashTable traceWeak. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D46614

--HG--
extra : moz-landing-system : lando
2019-10-14 09:21:58 +00:00
Jon Coppeard
ad4df9ae33 Bug 1581574 - Remove Heap<T> write barrier and rely on existing read barrier to make incremental marking work r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D46133

--HG--
extra : moz-landing-system : lando
2019-09-20 10:09:19 +00:00
Jon Coppeard
8b73371be0 Bug 1407593 - Report embedding leaks of JS GC things r=sfink,sfink?
Patch to report JS GC things that are live at shutdown as leaks by calling MOZ_LOG_CTOR for them. The JS engine now clears any remaining roots to prevent dangling pointers to freed memory after shutdown. I made XPCJSRuntime::Shutdown keep the weak pointer update callbacks as sometimes these tables have entries remaining at shutdown (if there are leaks) and we need the callbacks to update them.

This is looking more green on try now.

Differential Revision: https://phabricator.services.mozilla.com/D40449

--HG--
extra : moz-landing-system : lando
2019-08-13 08:31:49 +00:00
Yoshi Cheng-Hao Huang
a29edd5706 Bug 1570590 : trace weak references in tracing. r=jonco
Introduces SweepingTracer and TraceWeakEdge to trace weak references in
AtomsTable::sweep and AtomsTable::sweepIncrementally while sweeping.
Also rename those two functions to traceWeak and traceWeakIncrementally.

Differential Revision: https://phabricator.services.mozilla.com/D40939

--HG--
extra : moz-landing-system : lando
2019-08-08 12:27:50 +00:00
Yoshi Cheng-Hao Huang
e17d60cbf4 Bug 1551810 - Part 1: return bool in CallbackTracer methods. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D38980

--HG--
extra : moz-landing-system : lando
2019-07-26 08:59:38 +00:00
Paul Bone
97cbd21e24 Bug 1557928 - Rename the DoNotCare tracer kind r=jonco
Depends on D34675

Differential Revision: https://phabricator.services.mozilla.com/D34703

--HG--
extra : moz-landing-system : lando
2019-06-13 01:11:53 +00:00
Andreea Pavel
9d535a8d72 Backed out 4 changesets (bug 1557928) SM build bustages on a CLOSED TREE
Backed out changeset 5e5b8a770b18 (bug 1557928)
Backed out changeset 6096454af6f1 (bug 1557928)
Backed out changeset 618afaab2634 (bug 1557928)
Backed out changeset ef396dbaecf3 (bug 1557928)
2019-06-13 04:07:17 +03:00
Paul Bone
ee87fa7f84 Bug 1557928 - Rename the DoNotCare tracer kind r=jonco
Depends on D34675

Differential Revision: https://phabricator.services.mozilla.com/D34703

--HG--
extra : moz-landing-system : lando
2019-06-12 16:23:47 +00:00
Cosmin Sabou
7658be0902 Backed out 6 changesets (bug 1556321, bug 1556430, bug 1167452) for causing multiple regressions.
Backed out changeset 667da63fb2b1 (bug 1556430)
Backed out changeset 5ec3133f6457 (bug 1556321)
Backed out changeset 585157ab153a (bug 1556321)
Backed out changeset 72fc109fe0f2 (bug 1167452)
Backed out changeset 11d3f2265b35 (bug 1167452)
Backed out changeset 37f9bd277c34 (bug 1167452)
2019-06-11 07:04:16 +03:00
Steve Fink
6eee7b5e6f Bug 1167452 - Barrier weakmap operations and maintain weak keys table during incremental collections. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D31958

--HG--
extra : moz-landing-system : lando
2019-05-31 23:33:48 +00:00
Jon Coppeard
b425876903 Bug 1306008 - Give JS::Heap<T> pointer wrappers a pre-barrier r=sfink
This adds a pre write barrier to Heap<T> so that these can be uses as non-roots in the heap without breaking our snapshot at the beginning invariant if they are written to during an incremental GC. This makes it harder to misuse and allows us to take out manual barriers in at least one place.

Differential Revision: https://phabricator.services.mozilla.com/D25083
2019-03-27 16:26:09 +00:00
Andy Wingo
7d559ef8c3 Bug 1527860 - Remove ENABLE_BIGINT #ifdef r=jandem,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D19766

--HG--
extra : moz-landing-system : lando
2019-02-14 15:03:44 +00:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier
a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan de Mooij
bccfe7c569 Bug 1508065 - Change JS_PUBLIC_{API,DATA} and JS_FRIEND_{API,DATA} to be more like similar macros to avoid confusing clang-format. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D12256

--HG--
extra : moz-landing-system : lando
2018-11-19 17:02:47 +00:00
Jan de Mooij
ab644b087f Bug 1488698 - Always use braces for if/for/while statements in js/public. r=jandem
--HG--
extra : rebase_source : 075f0747c9256fee67925853b501b7a3549cebba
2018-09-06 12:11:07 +02:00
Jan de Mooij
f7fb3be6ec Bug 1466121 part 1 - Rename JSCompartment to JS::Compartment. r=luke
--HG--
extra : rebase_source : cd7140ecda54f0caa02a96f562167b3c9a107450
2018-06-07 16:44:40 +02:00
Robin Templeton
de41c625dd Bug 1366287 - Part 1.0: Define a new BigInt primitive type, with a GDB prettyprinter, Rust binding support, and a new out-of-line TraceKind. (Disabled by default, implemented only incompletely, currently passing --enable-bigint will disable JITs, will be flipped on Eventually once every sub-aspect is in place, Don't Have A Cow, Man.) r=jwalden, r=Ms2ger, r=sfink
--HG--
extra : rebase_source : aa13bd94bc6157ff8134894e3ba2e7a2b53e28d9
2018-05-24 11:26:09 -07:00
Andrew McCreight
6c4a1d23f2 Bug 1460636 - Don't trace jsids on ObjectGroup in the cycle collector. r=jonco,sfink
For some reason, the CC spends a lot of time tracing jsids on
ObjectGroups when an addon is installed. This patch avoids that by
adding a canSkipJsids flag to JSTracer, and using it in
ObjectGroup::traceChildren. If this is true, then the tracer is free
to not report every jsid. This flag is set to true for the two CC
tracers.

MozReview-Commit-ID: CWFqQEr0SxV

--HG--
extra : rebase_source : cc31c22717f8990166454db191e0d40c145e09f0
2018-05-11 11:38:58 -07:00
Jason Orendorff
e7c94fff59 Bug 1439063 - Part 1: Move several public headers from js/src to js/public. r=jandem.
js/src/jsalloc.h -> js/public/AllocPolicy.h
jsalloc.cpp -> js/src/util/AllocPolicy.cpp
jsbytecode.h -> merge into js/public/TypeDecls.h
jsprf.h -> js/public/Printf.h
jsprf.cpp -> js/src/util/Printf.cpp
jsprototypes.h -> public/ProtoKey.h
jswrapper.h -> js/Wrapper.h

--HG--
rename : js/src/jsalloc.h => js/public/AllocPolicy.h
rename : js/src/jsprf.h => js/public/Printf.h
rename : js/src/jsprototypes.h => js/public/ProtoKey.h
rename : js/src/jswrapper.h => js/public/Wrapper.h
rename : js/src/jsalloc.cpp => js/src/util/AllocPolicy.cpp
rename : js/src/jsprf.cpp => js/src/util/Printf.cpp
extra : rebase_source : 98b16d94c469202eab0303a8da844f1d0b6aa809
extra : amend_source : e0b16c1077226d6fe240f4d7096537f93b43f2b8
extra : histedit_source : d94e0ba7904a7d66742c7fac43f638aaec4fa4e5
2018-02-21 10:30:19 -06:00
Jon Coppeard
757573b0fe Bug 1417077 - Make JSTracer provide the current GC number and use this in nsXULPrototypeDocument::TraceProtos() r=sfink r=mccr8 2017-11-14 17:10:30 +00:00
Jon Coppeard
3075bc5440 Bug 1384885 - Do gray unmarking of cross zone edges as soon as they are found r=sfink 2017-07-28 11:06:40 +01:00
Jon Coppeard
73aaca8f5b Bug 1378717 - Allow inlining of TraceEdge API's null check r=sfink 2017-07-11 16:51:37 +01:00
Jon Coppeard
5d86054665 Bug 1371234 - Clear GC edges when deleting a GC managed object outside a GC r=sfink 2017-06-14 10:29:52 +01:00
Jon Coppeard
973692b373 Bug 1345177 - Make RegExpShared a GC thing r=sfink 2017-03-27 10:38:29 +01:00
Jon Coppeard
1376c2700e Backed out changesets e66f564d9749 and 0380d914ad39 (bug 1345177) for rooting hazards 2017-03-27 11:09:54 +01:00
Jon Coppeard
f7a6438226 Bug 1345177 - Make RegExpShared a GC thing r=sfink 2017-03-27 10:38:29 +01:00
Jon Coppeard
51ef98020d Bug 1335751 - Add js::CheckGrayMarkingState friend API to check there are black to gray edges r=sfink 2017-03-05 09:23:09 +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
fecd704a79 Bug 1335751 - Add js::CheckGrayMarkingState friend API to check there are black to gray edges r=sfink 2017-03-05 09:23:09 +00:00
Jon Coppeard
ff9db2128c Bug 1318384 - Remove barriers on Zone typed object descriptors set to avoid reviving compartments r=billm 2016-11-23 10:15:05 +00:00
Shu-yu Guo
e2b6833e0a Bug 1263355 - Rewrite the frontend: bindings. (r=jorendorff,Waldo) 2016-08-25 01:28:47 -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
Steve Fink
87e914a089 No bug. Comment TracerKindTag values. r=me, a=DONTBUILD
MozReview-Commit-ID: EJbBTKpQgNo

--HG--
extra : transplant_source : K%26%27X%D3/%AD%AC%DF%E3%BE%9CG5%90%FA%A9%0E%7F%0F
extra : histedit_source : db0dc1c5815b8eccaedb369a3b9c3ea01c2b25ea
2016-06-17 01:46:51 +01:00
Jon Coppeard
35a9e3a430 Bug 1272604 - Add a zeal mode to check the heap after a moving GC r=terrence 2016-05-16 14:23:09 +01:00
Terrence Cole
b7c56d9cba Bug 1233862 - Add a WeakCache builtin to automatically manage sweeping; r=sfink
--HG--
extra : rebase_source : 5731194b652a17fdcbc666d965690949f28b3ada
2015-12-18 14:50:20 -08:00
Nick Fitzgerald
1685818a63 Bug 1254092 - TraceIncomingCCWs should work at the JSCompartment level of granularity. r=jimb
There can be multiple compartments within the same zone, only one of which is a
debuggee. In this scenario, CCWs from other compartments into the debuggee
compartment should be traced and treated as roots. Therefore, dealing with CCWs
at the JS::Zone level is incorrect, and this patch changes the granularity level
to JSCompartments. If you look at the callers and uses of the function, it makes
much more sense now.

Additionally, it renames `JS_TraceIncomingCCWs` to `JS::TraceIncomingCCWs`.

--HG--
rename : devtools/shared/heapsnapshot/tests/gtest/DoesCrossZoneBoundaries.cpp => devtools/shared/heapsnapshot/tests/gtest/DoesCrossCompartmentBoundaries.cpp
rename : devtools/shared/heapsnapshot/tests/gtest/DoesntCrossZoneBoundaries.cpp => devtools/shared/heapsnapshot/tests/gtest/DoesntCrossCompartmentBoundaries.cpp
2016-03-14 16:11:00 +01:00
Terrence Cole
52e9feb9d3 Bug 1234862 - Part 5: Rename DefaultGCPolicy to GCPolicy; r=sfink 2016-01-26 12:53:35 -08:00
Terrence Cole
738245d262 Bug 1238786 - Part 1: Allow null pointers in public tracing APIs; r=sfink
--HG--
extra : rebase_source : aaa025bffb09758f886450b8a6a9372a65fa6db7
2016-01-12 13:07:53 -08:00