bug 1368086 - Rename gcIfNeededPerAllocation to gcIfNeededAtAllocation, r=sfink
authorPaul Bone <pbone@mozilla.com>
Sat, 27 May 2017 03:00:51 +1000
changeset 361078 d3bad87d7582
parent 361077 bff0074f09a1
child 361079 22b07d362869
push id31915
push usercbook@mozilla.com
push dateMon, 29 May 2017 08:23:34 +0000
treeherdermozilla-central@cce4d83d2b99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1368086
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1368086 - Rename gcIfNeededPerAllocation to gcIfNeededAtAllocation, r=sfink MozReview-Commit-ID: Jwk4TPDObJc
js/src/gc/Allocator.cpp
js/src/gc/GCRuntime.h
--- a/js/src/gc/Allocator.cpp
+++ b/js/src/gc/Allocator.cpp
@@ -183,17 +183,17 @@ GCRuntime::tryNewTenuredThing(JSContext*
     return t;
 }
 
 template <AllowGC allowGC>
 bool
 GCRuntime::checkAllocatorState(JSContext* cx, AllocKind kind)
 {
     if (allowGC) {
-        if (!gcIfNeededPerAllocation(cx))
+        if (!gcIfNeededAtAllocation(cx))
             return false;
     }
 
 #if defined(JS_GC_ZEAL) || defined(DEBUG)
     MOZ_ASSERT_IF(cx->compartment()->isAtomsCompartment(),
                   kind == AllocKind::ATOM ||
                   kind == AllocKind::FAT_INLINE_ATOM ||
                   kind == AllocKind::SYMBOL ||
@@ -218,17 +218,17 @@ GCRuntime::checkAllocatorState(JSContext
             ReportOutOfMemory(cx);
         return false;
     }
 
     return true;
 }
 
 bool
-GCRuntime::gcIfNeededPerAllocation(JSContext* cx)
+GCRuntime::gcIfNeededAtAllocation(JSContext* cx)
 {
 #ifdef JS_GC_ZEAL
     if (needZealousGC())
         runDebugGC();
 #endif
 
     // Invoking the interrupt callback can fail and we can't usefully
     // handle that here. Just check in case we need to collect instead.
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -911,17 +911,17 @@ class GCRuntime
     friend class ArenaLists;
     Chunk* pickChunk(const AutoLockGC& lock,
                      AutoMaybeStartBackgroundAllocation& maybeStartBGAlloc);
     Arena* allocateArena(Chunk* chunk, Zone* zone, AllocKind kind,
                          ShouldCheckThresholds checkThresholds, const AutoLockGC& lock);
     void arenaAllocatedDuringGC(JS::Zone* zone, Arena* arena);
 
     // Allocator internals
-    MOZ_MUST_USE bool gcIfNeededPerAllocation(JSContext* cx);
+    MOZ_MUST_USE bool gcIfNeededAtAllocation(JSContext* cx);
     template <typename T>
     static void checkIncrementalZoneState(JSContext* cx, T* t);
     static TenuredCell* refillFreeListFromAnyThread(JSContext* cx, AllocKind thingKind,
                                                     size_t thingSize);
     static TenuredCell* refillFreeListFromActiveCooperatingThread(JSContext* cx, AllocKind thingKind,
                                                                   size_t thingSize);
     static TenuredCell* refillFreeListFromHelperThread(JSContext* cx, AllocKind thingKind);