mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 1130226 - Part 2: Rename MAYBEGC to EAGER_ALLOC_TRIGGER and fix some improper uses; r=jonco
--HG-- extra : rebase_source : 2e2e79921503fda34f7904eaa2566fb761e8a88d
This commit is contained in:
parent
fc966f17e9
commit
606e7f9ff7
@ -45,7 +45,7 @@ namespace JS {
|
||||
#define GCREASONS(D) \
|
||||
/* Reasons internal to the JS engine */ \
|
||||
D(API) \
|
||||
D(MAYBEGC) \
|
||||
D(EAGER_ALLOC_TRIGGER) \
|
||||
D(DESTROY_RUNTIME) \
|
||||
D(DESTROY_CONTEXT) \
|
||||
D(LAST_DITCH) \
|
||||
@ -58,6 +58,7 @@ namespace JS {
|
||||
D(EVICT_NURSERY) \
|
||||
D(FULL_STORE_BUFFER) \
|
||||
D(SHARED_MEMORY_LIMIT) \
|
||||
D(PERIODIC_FULL_GC) \
|
||||
\
|
||||
/* These are reserved for future use. */ \
|
||||
D(RESERVED0) \
|
||||
@ -78,7 +79,6 @@ namespace JS {
|
||||
D(RESERVED15) \
|
||||
D(RESERVED16) \
|
||||
D(RESERVED17) \
|
||||
D(RESERVED18) \
|
||||
\
|
||||
/* Reasons from Firefox */ \
|
||||
D(DOM_WINDOW_UTILS) \
|
||||
|
@ -3208,7 +3208,7 @@ GCRuntime::maybeGC(Zone *zone)
|
||||
#ifdef JS_GC_ZEAL
|
||||
if (zealMode == ZealAllocValue || zealMode == ZealPokeValue) {
|
||||
JS::PrepareForFullGC(rt);
|
||||
gc(GC_NORMAL, JS::gcreason::MAYBEGC);
|
||||
gc(GC_NORMAL, JS::gcreason::DEBUG_GC);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@ -3222,7 +3222,7 @@ GCRuntime::maybeGC(Zone *zone)
|
||||
!isBackgroundSweeping())
|
||||
{
|
||||
PrepareZoneForGC(zone);
|
||||
startGC(GC_NORMAL, JS::gcreason::MAYBEGC);
|
||||
startGC(GC_NORMAL, JS::gcreason::EAGER_ALLOC_TRIGGER);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -3248,7 +3248,7 @@ GCRuntime::maybePeriodicFullGC()
|
||||
numArenasFreeCommitted > decommitThreshold)
|
||||
{
|
||||
JS::PrepareForFullGC(rt);
|
||||
startGC(GC_SHRINK, JS::gcreason::MAYBEGC);
|
||||
startGC(GC_SHRINK, JS::gcreason::PERIODIC_FULL_GC);
|
||||
} else {
|
||||
nextFullGCTime = now + GC_IDLE_FULL_SPAN;
|
||||
}
|
||||
@ -6091,7 +6091,7 @@ IsDeterministicGCReason(JS::gcreason::Reason reason)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (reason == JS::gcreason::MAYBEGC)
|
||||
if (reason == JS::gcreason::EAGER_ALLOC_TRIGGER)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user