bug 1368086 - Rename gcIfNeededPerAllocation to gcIfNeededAtAllocation, r=sfink
authorPaul Bone <pbone@mozilla.com>
Sat, 27 May 2017 03:00:51 +1000
changeset 409195 d3bad87d7582da33b4e8d163fdf11be1851688c3
parent 409194 bff0074f09a1effd40b1b6f87391e86e52c650a7
child 409196 22b07d362869f35af94524f077e0613f9b041fb9
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [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);