summaryrefslogtreecommitdiffstats
path: root/js/src/jsgc.h
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-04-29 11:59:46 +0300
committerGitHub <noreply@github.com>2019-04-29 11:59:46 +0300
commit5a65d8739d0ad6ef446b278a25fd955f0c734fb1 (patch)
tree6a947b3ad89ee96f62c9a814e93070356162819f /js/src/jsgc.h
parentcd296c598a587b58a0e2a579c9be5aa255669829 (diff)
downloadUXP-5a65d8739d0ad6ef446b278a25fd955f0c734fb1.tar
UXP-5a65d8739d0ad6ef446b278a25fd955f0c734fb1.tar.gz
UXP-5a65d8739d0ad6ef446b278a25fd955f0c734fb1.tar.lz
UXP-5a65d8739d0ad6ef446b278a25fd955f0c734fb1.tar.xz
UXP-5a65d8739d0ad6ef446b278a25fd955f0c734fb1.zip
Improve dead compartment collection js/src
Diffstat (limited to 'js/src/jsgc.h')
-rw-r--r--js/src/jsgc.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/js/src/jsgc.h b/js/src/jsgc.h
index d3cf31fe7..aa42d474c 100644
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -61,7 +61,8 @@ enum class State {
D(ModeChange) \
D(MallocBytesTrigger) \
D(GCBytesTrigger) \
- D(ZoneChange)
+ D(ZoneChange) \
+ D(CompartmentRevived)
enum class AbortReason {
#define MAKE_REASON(name) name,
GC_ABORT_REASONS(MAKE_REASON)
@@ -353,7 +354,6 @@ struct SortedArenaListSegment
* be treated as an invariant, however, as the free lists may be cleared,
* leaving arenas previously used for allocation partially full. Sorting order
* is restored during sweeping.
-
* Arenas following the cursor should not be full.
*/
class ArenaList {
@@ -453,6 +453,11 @@ class ArenaList {
check();
return !*cursorp_;
}
+
+ void moveCursorToEnd() {
+ while (!isCursorAtEnd())
+ cursorp_ = &(*cursorp_)->next;
+ }
// This can return nullptr.
Arena* arenaAfterCursor() const {
@@ -739,7 +744,7 @@ class ArenaLists
freeLists[i] = &placeholder;
}
- inline void prepareForIncrementalGC(JSRuntime* rt);
+ inline void prepareForIncrementalGC();
/* Check if this arena is in use. */
bool arenaIsInUse(Arena* arena, AllocKind kind) const {
@@ -1504,4 +1509,4 @@ UninlinedIsInsideNursery(const gc::Cell* cell);
} /* namespace js */
-#endif /* jsgc_h */
+#endif /* jsgc_h */ \ No newline at end of file