Bug 1452982 part 9 - Remove/rename remaining ZoneGroup references. r=jonco
authorJan de Mooij <jdemooij@mozilla.com>
Sat, 14 Apr 2018 09:03:47 +0200
changeset 466889 a434fac58370fc14bceb525e1ca8b7125638b6cd
parent 466888 35d142c5c599f67545b6e7557018bfb7a48540e1
child 466890 37b8862d354e0014a72715462dd2102dd5b599cc
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1452982
milestone61.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 1452982 part 9 - Remove/rename remaining ZoneGroup references. r=jonco
js/src/gc/ArenaList.h
js/src/gc/Scheduling.h
js/src/gc/Zone.h
js/src/jit/Ion.cpp
js/src/jsfriendapi.cpp
js/src/jsfriendapi.h
js/src/shell/js.cpp
js/src/threading/ProtectedData.h
js/src/vm/HelperThreads.cpp
js/src/vm/JSContext.cpp
js/src/vm/JSContext.h
js/src/vm/Runtime.h
js/src/vm/TypeInference.h
xpcom/threads/Scheduler.cpp
--- a/js/src/gc/ArenaList.h
+++ b/js/src/gc/ArenaList.h
@@ -231,17 +231,17 @@ class ArenaLists
     inline void setFreeList(AllocKind i, FreeSpan* span);
     inline void clearFreeList(AllocKind i);
 
     // Because the JITs can allocate from the free lists, they cannot be null.
     // We use a placeholder FreeSpan that is empty (and wihout an associated
     // Arena) so the JITs can fall back gracefully.
     static FreeSpan placeholder;
 
-    ZoneGroupOrGCTaskData<AllAllocKindArray<ArenaList>> arenaLists_;
+    ZoneOrGCTaskData<AllAllocKindArray<ArenaList>> arenaLists_;
     ArenaList& arenaLists(AllocKind i) { return arenaLists_.ref()[i]; }
     const ArenaList& arenaLists(AllocKind i) const { return arenaLists_.ref()[i]; }
 
     enum BackgroundFinalizeStateEnum { BFS_DONE, BFS_RUN };
 
     typedef mozilla::Atomic<BackgroundFinalizeStateEnum, mozilla::SequentiallyConsistent>
         BackgroundFinalizeState;
 
@@ -251,18 +251,18 @@ class ArenaLists
     const BackgroundFinalizeState& backgroundFinalizeState(AllocKind i) const { return backgroundFinalizeState_.ref()[i]; }
 
     /* For each arena kind, a list of arenas remaining to be swept. */
     ActiveThreadOrGCTaskData<AllAllocKindArray<Arena*>> arenaListsToSweep_;
     Arena*& arenaListsToSweep(AllocKind i) { return arenaListsToSweep_.ref()[i]; }
     Arena* arenaListsToSweep(AllocKind i) const { return arenaListsToSweep_.ref()[i]; }
 
     /* During incremental sweeping, a list of the arenas already swept. */
-    ZoneGroupOrGCTaskData<AllocKind> incrementalSweptArenaKind;
-    ZoneGroupOrGCTaskData<ArenaList> incrementalSweptArenas;
+    ZoneOrGCTaskData<AllocKind> incrementalSweptArenaKind;
+    ZoneOrGCTaskData<ArenaList> incrementalSweptArenas;
 
     // Arena lists which have yet to be swept, but need additional foreground
     // processing before they are swept.
     ZoneData<Arena*> gcShapeArenasToUpdate;
     ZoneData<Arena*> gcAccessorShapeArenasToUpdate;
     ZoneData<Arena*> gcScriptArenasToUpdate;
     ZoneData<Arena*> gcObjectGroupArenasToUpdate;
 
--- a/js/src/gc/Scheduling.h
+++ b/js/src/gc/Scheduling.h
@@ -335,17 +335,17 @@ class GCSchedulingTunables
      *
      * Initial malloc bytes threshold.
      */
     UnprotectedData<size_t> maxMallocBytes_;
 
     /*
      * JSGC_MAX_NURSERY_BYTES
      *
-     * Maximum nursery size for each zone group.
+     * Maximum nursery size for each runtime.
      */
     ActiveThreadData<size_t> gcMaxNurseryBytes_;
 
     /*
      * JSGC_ALLOCATION_THRESHOLD
      *
      * The base value used to compute zone->threshold.gcTriggerBytes(). When
      * usage.gcBytes() surpasses threshold.gcTriggerBytes() for a zone, the
--- a/js/src/gc/Zone.h
+++ b/js/src/gc/Zone.h
@@ -264,17 +264,17 @@ struct Zone : public JS::shadow::Zone,
 
     js::jit::JitZone* createJitZone(JSContext* cx);
 
     bool isQueuedForBackgroundSweep() {
         return isOnList();
     }
 
     // Side map for storing a unique ids for cells, independent of address.
-    js::ZoneGroupOrGCTaskData<js::gc::UniqueIdMap> uniqueIds_;
+    js::ZoneOrGCTaskData<js::gc::UniqueIdMap> uniqueIds_;
 
     js::gc::UniqueIdMap& uniqueIds() { return uniqueIds_.ref(); }
 
   public:
     bool hasDebuggers() const { return debuggers && debuggers->length(); }
     DebuggerVector* getDebuggers() const { return debuggers; }
     DebuggerVector* getOrCreateDebuggers(JSContext* cx);
 
@@ -294,58 +294,58 @@ struct Zone : public JS::shadow::Zone,
     js::ZoneData<bool> suppressAllocationMetadataBuilder;
 
     js::gc::ArenaLists arenas;
 
     js::TypeZone types;
 
   private:
     /* Live weakmaps in this zone. */
-    js::ZoneGroupOrGCTaskData<mozilla::LinkedList<js::WeakMapBase>> gcWeakMapList_;
+    js::ZoneOrGCTaskData<mozilla::LinkedList<js::WeakMapBase>> gcWeakMapList_;
   public:
     mozilla::LinkedList<js::WeakMapBase>& gcWeakMapList() { return gcWeakMapList_.ref(); }
 
     typedef js::Vector<JSCompartment*, 1, js::SystemAllocPolicy> CompartmentVector;
 
   private:
     // The set of compartments in this zone.
     js::ActiveThreadOrGCTaskData<CompartmentVector> compartments_;
   public:
     CompartmentVector& compartments() { return compartments_.ref(); }
 
     // This zone's gray roots.
     typedef js::Vector<js::gc::Cell*, 0, js::SystemAllocPolicy> GrayRootVector;
   private:
-    js::ZoneGroupOrGCTaskData<GrayRootVector> gcGrayRoots_;
+    js::ZoneOrGCTaskData<GrayRootVector> gcGrayRoots_;
   public:
     GrayRootVector& gcGrayRoots() { return gcGrayRoots_.ref(); }
 
     // This zone's weak edges found via graph traversal during marking,
     // preserved for re-scanning during sweeping.
     using WeakEdges = js::Vector<js::gc::TenuredCell**, 0, js::SystemAllocPolicy>;
   private:
-    js::ZoneGroupOrGCTaskData<WeakEdges> gcWeakRefs_;
+    js::ZoneOrGCTaskData<WeakEdges> gcWeakRefs_;
   public:
     WeakEdges& gcWeakRefs() { return gcWeakRefs_.ref(); }
 
   private:
     // List of non-ephemeron weak containers to sweep during beginSweepingSweepGroup.
-    js::ZoneGroupOrGCTaskData<mozilla::LinkedList<detail::WeakCacheBase>> weakCaches_;
+    js::ZoneOrGCTaskData<mozilla::LinkedList<detail::WeakCacheBase>> weakCaches_;
   public:
     mozilla::LinkedList<detail::WeakCacheBase>& weakCaches() { return weakCaches_.ref(); }
     void registerWeakCache(detail::WeakCacheBase* cachep) {
         weakCaches().insertBack(cachep);
     }
 
   private:
     /*
      * Mapping from not yet marked keys to a vector of all values that the key
      * maps to in any live weak map.
      */
-    js::ZoneGroupOrGCTaskData<js::gc::WeakKeyTable> gcWeakKeys_;
+    js::ZoneOrGCTaskData<js::gc::WeakKeyTable> gcWeakKeys_;
   public:
     js::gc::WeakKeyTable& gcWeakKeys() { return gcWeakKeys_.ref(); }
 
   private:
     // A set of edges from this zone to other zones.
     //
     // This is used during GC while calculating sweep groups to record edges
     // that can't be determined by examining this zone by itself.
@@ -435,26 +435,26 @@ struct Zone : public JS::shadow::Zone,
     js::gc::TriggerKind shouldTriggerGCForTooMuchMalloc() {
         auto& gc = runtimeFromAnyThread()->gc;
         return std::max(gcMallocCounter.shouldTriggerGC(gc.tunables),
                         jitCodeCounter.shouldTriggerGC(gc.tunables));
     }
 
   private:
     // Bitmap of atoms marked by this zone.
-    js::ZoneGroupOrGCTaskData<js::SparseBitmap> markedAtoms_;
+    js::ZoneOrGCTaskData<js::SparseBitmap> markedAtoms_;
 
     // Set of atoms recently used by this Zone. Purged on GC.
-    js::ZoneGroupOrGCTaskData<js::AtomSet> atomCache_;
+    js::ZoneOrGCTaskData<js::AtomSet> atomCache_;
 
     // Cache storing allocated external strings. Purged on GC.
-    js::ZoneGroupOrGCTaskData<js::ExternalStringCache> externalStringCache_;
+    js::ZoneOrGCTaskData<js::ExternalStringCache> externalStringCache_;
 
     // Cache for Function.prototype.toString. Purged on GC.
-    js::ZoneGroupOrGCTaskData<js::FunctionToStringCache> functionToStringCache_;
+    js::ZoneOrGCTaskData<js::FunctionToStringCache> functionToStringCache_;
 
   public:
     js::SparseBitmap& markedAtoms() { return markedAtoms_.ref(); }
 
     js::AtomSet& atomCache() { return atomCache_.ref(); }
 
     js::ExternalStringCache& externalStringCache() { return externalStringCache_.ref(); };
 
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -1962,27 +1962,27 @@ AttachFinishedCompilations(JSContext* cx
         return;
 
     AutoLockHelperThreadState lock;
     GlobalHelperThreadState::IonBuilderVector& finished = HelperThreadState().ionFinishedList(lock);
 
     // Incorporate any off thread compilations for the runtime which have
     // finished, failed or have been cancelled.
     while (true) {
-        // Find a finished builder for the zone group.
+        // Find a finished builder for the runtime.
         IonBuilder* builder = GetFinishedBuilder(rt, finished, lock);
         if (!builder)
             break;
 
         JSScript* script = builder->script();
         MOZ_ASSERT(script->hasBaselineScript());
         script->baselineScript()->setPendingIonBuilder(rt, script, builder);
         rt->jitRuntime()->ionLazyLinkListAdd(rt, builder);
 
-        // Don't keep more than 100 lazy link builders in a zone group.
+        // Don't keep more than 100 lazy link builders in a runtime.
         // Link the oldest ones immediately.
         while (rt->jitRuntime()->ionLazyLinkListSize() > 100) {
             jit::IonBuilder* builder = rt->jitRuntime()->ionLazyLinkList(rt).getLast();
             RootedScript script(cx, builder->script());
 
             AutoUnlockHelperThreadState unlock(lock);
             AutoCompartment ac(cx, script);
             jit::LinkIonScript(cx, script);
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -1529,22 +1529,16 @@ js::EnableAccessValidation(JSContext* cx
 }
 
 JS_FRIEND_API(void)
 js::SetCompartmentValidAccessPtr(JSContext* cx, JS::HandleObject global, bool* accessp)
 {
     global->compartment()->setValidAccessPtr(accessp);
 }
 
-JS_FRIEND_API(void)
-js::SetCooperativeYieldCallback(JSContext* cx, YieldCallback callback)
-{
-    cx->setYieldCallback(callback);
-}
-
 JS_FRIEND_API(bool)
 js::SystemZoneAvailable(JSContext* cx)
 {
     return true;
 }
 
 static LogCtorDtor sLogCtor = nullptr;
 static LogCtorDtor sLogDtor = nullptr;
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -3121,25 +3121,16 @@ EnableAccessValidation(JSContext* cx, bo
 
 // See EnableAccessValidation above. The caller must guarantee that accessp will
 // live at least as long as |global| is alive. The JS engine reads accessp from
 // threads that are allowed to run code on |global|, so all changes to *accessp
 // should be made from whichever thread owns |global| at a given time.
 extern JS_FRIEND_API(void)
 SetCompartmentValidAccessPtr(JSContext* cx, JS::HandleObject global, bool* accessp);
 
-// If the JS engine wants to block so that other cooperative threads can run, it
-// will call the yield callback. It may do this if it needs to access a ZoneGroup
-// that is held by another thread (such as the system zone group).
-typedef void
-(* YieldCallback)(JSContext* cx);
-
-extern JS_FRIEND_API(void)
-SetCooperativeYieldCallback(JSContext* cx, YieldCallback callback);
-
 // Returns true if the system zone is available (i.e., if no cooperative contexts
 // are using it now).
 extern JS_FRIEND_API(bool)
 SystemZoneAvailable(JSContext* cx);
 
 typedef void
 (* LogCtorDtor)(void* self, const char* type, uint32_t sz);
 
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -6552,18 +6552,16 @@ static const JSFunctionSpecWithHelp shel
 "  Evaluate code as though it were the contents of a file.\n"
 "  options is an optional object that may have these properties:\n"
 "      isRunOnce: use the isRunOnce compiler option (default: false)\n"
 "      noScriptRval: use the no-script-rval compiler option (default: false)\n"
 "      fileName: filename for error messages and debug info\n"
 "      lineNumber: starting line number for error messages and debug info\n"
 "      columnNumber: starting column number for error messages and debug info\n"
 "      global: global in which to execute the code\n"
-"      zoneGroup: pick a global from another zone group with no current context\n"
-"         to execute the code in\n"
 "      newContext: if true, create and use a new cx (default: false)\n"
 "      catchTermination: if true, catch termination (failure without\n"
 "         an exception value, as for slow scripts or out-of-memory)\n"
 "         and return 'terminated'\n"
 "      element: if present with value |v|, convert |v| to an object |o| and\n"
 "         mark the source as being attached to the DOM element |o|. If the\n"
 "         property is omitted or |v| is null, don't attribute the source to\n"
 "         any DOM element.\n"
--- a/js/src/threading/ProtectedData.h
+++ b/js/src/threading/ProtectedData.h
@@ -138,25 +138,25 @@ class ProtectedDataNoCheckArgs : public 
     explicit ProtectedDataNoCheckArgs(Args&&... args)
       : ProtectedData<Check, T>(Check(), mozilla::Forward<Args>(args)...)
     {}
 
     template <typename U>
     ThisType& operator=(const U& p) { this->ref() = p; return *this; }
 };
 
-// Intermediate class for protected data whose checks take a ZoneGroup constructor argument.
+// Intermediate class for protected data whose checks take a Zone constructor argument.
 template <typename Check, typename T>
-class ProtectedDataZoneGroupArg : public ProtectedData<Check, T>
+class ProtectedDataZoneArg : public ProtectedData<Check, T>
 {
-    typedef ProtectedDataZoneGroupArg<Check, T> ThisType;
+    typedef ProtectedDataZoneArg<Check, T> ThisType;
 
   public:
     template <typename... Args>
-    explicit ProtectedDataZoneGroupArg(JS::Zone* zone, Args&&... args)
+    explicit ProtectedDataZoneArg(JS::Zone* zone, Args&&... args)
       : ProtectedData<Check, T>(Check(zone), mozilla::Forward<Args>(args)...)
     {}
 
     template <typename U>
     ThisType& operator=(const U& p) { this->ref() = p; return *this; }
 };
 
 class CheckUnprotected
@@ -187,17 +187,17 @@ class CheckThreadLocal
 #endif
 };
 
 // Data which may only be accessed by the thread on which it is created.
 template <typename T>
 using ThreadLocalData = ProtectedDataNoCheckArgs<CheckThreadLocal, T>;
 
 // Enum describing which helper threads (GC tasks or Ion compilations) may
-// access data even though they do not have exclusive access to any zone group.
+// access data even though they do not have exclusive access to any zone.
 enum class AllowedHelperThread
 {
     None,
     GCTask,
     IonCompile,
     GCTaskOrIonCompile
 };
 
@@ -234,33 +234,33 @@ class CheckZone
     void check() const;
 #else
   public:
     explicit CheckZone(JS::Zone* zone) {}
 #endif
 };
 
 // Data which may only be accessed by threads with exclusive access to the
-// associated zone group, or by the runtime's cooperatively scheduled
-// active thread for zone groups which are not in use by a helper thread.
+// associated zone, or by the runtime's main thread for zones which are not in
+// use by a helper thread.
 template <typename T>
 using ZoneData =
-    ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::None>, T>;
+    ProtectedDataZoneArg<CheckZone<AllowedHelperThread::None>, T>;
 
 // Data which may only be accessed by threads with exclusive access to the
-// associated zone group, or by various helper thread tasks.
+// associated zone, or by various helper thread tasks.
 template <typename T>
-using ZoneGroupOrGCTaskData =
-    ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::GCTask>, T>;
+using ZoneOrGCTaskData =
+    ProtectedDataZoneArg<CheckZone<AllowedHelperThread::GCTask>, T>;
 template <typename T>
-using ZoneGroupOrIonCompileData =
-    ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::IonCompile>, T>;
+using ZoneOrIonCompileData =
+    ProtectedDataZoneArg<CheckZone<AllowedHelperThread::IonCompile>, T>;
 template <typename T>
-using ZoneGroupOrGCTaskOrIonCompileData =
-    ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::GCTaskOrIonCompile>, T>;
+using ZoneOrGCTaskOrIonCompileData =
+    ProtectedDataZoneArg<CheckZone<AllowedHelperThread::GCTaskOrIonCompile>, T>;
 
 // Runtime wide locks which might protect some data.
 enum class GlobalLock
 {
     GCLock,
     ExclusiveAccessLock,
     ScriptDataLock,
     HelperThreadLock
--- a/js/src/vm/HelperThreads.cpp
+++ b/js/src/vm/HelperThreads.cpp
@@ -752,20 +752,20 @@ StartOffThreadParseTask(JSContext* cx, P
     gc::AutoSuppressGC nogc(cx);
     gc::AutoSuppressNurseryCellAlloc noNurseryAlloc(cx);
     AutoSuppressAllocationMetadataBuilder suppressMetadata(cx);
 
     JSObject* global = CreateGlobalForOffThreadParse(cx, nogc);
     if (!global)
         return false;
 
-    // Mark the global's zone group as created for a helper thread. This
-    // prevents it from being collected until clearUsedByHelperThread() is
-    // called after parsing is complete. If this function exits due to error
-    // this state is cleared automatically.
+    // Mark the global's zone as created for a helper thread. This prevents it
+    // from being collected until clearUsedByHelperThread() is called after
+    // parsing is complete. If this function exits due to error this state is
+    // cleared automatically.
     AutoSetCreatedForHelperThread createdForHelper(global);
 
     if (!task->init(cx, options, global))
         return false;
 
     if (!QueueOffThreadParseTask(cx, task))
         return false;
 
--- a/js/src/vm/JSContext.cpp
+++ b/js/src/vm/JSContext.cpp
@@ -182,20 +182,18 @@ js::DestroyContext(JSContext* cx)
 {
     JS_AbortIfWrongThread(cx);
 
     if (cx->outstandingRequests != 0)
         MOZ_CRASH("Attempted to destroy a context while it is in a request.");
 
     cx->checkNoGCRooters();
 
-    // Cancel all off thread Ion compiles before destroying a cooperative
-    // context. Completed Ion compiles may try to interrupt arbitrary
-    // cooperative contexts which they have read off the owner context of a
-    // zone group. See HelperThread::handleIonWorkload.
+    // Cancel all off thread Ion compiles. Completed Ion compiles may try to
+    // interrupt this context. See HelperThread::handleIonWorkload.
     CancelOffThreadIonCompile(cx->runtime());
 
     FreeJobQueueHandling(cx);
 
     // Flush promise tasks executing in helper threads early, before any parts
     // of the JSRuntime that might be visible to helper threads are torn down.
     cx->runtime()->offThreadPromiseState.ref().shutdown(cx);
 
--- a/js/src/vm/JSContext.h
+++ b/js/src/vm/JSContext.h
@@ -203,19 +203,17 @@ struct JSContext : public JS::RootingCon
 #ifdef DEBUG
     unsigned getEnterCompartmentDepth() const {
         return enterCompartmentDepth_;
     }
 #endif
 
   private:
     // We distinguish between entering the atoms compartment and all other
-    // compartments. Entering the atoms compartment requires a lock. Also, we
-    // don't call enterZoneGroup when entering the atoms compartment since that
-    // can induce GC hazards.
+    // compartments. Entering the atoms compartment requires a lock.
     inline void enterNonAtomsCompartment(JSCompartment* c);
     inline void enterAtomsCompartment(JSCompartment* c,
                                       const js::AutoLockForExclusiveAccess& lock);
 
     friend class js::AutoCompartment;
 
   public:
     template <typename T>
@@ -301,36 +299,20 @@ struct JSContext : public JS::RootingCon
     static size_t offsetOfCompartment() {
         return offsetof(JSContext, compartment_);
     }
 
     friend class JS::AutoSaveExceptionState;
     friend class js::jit::DebugModeOSRVolatileJitFrameIter;
     friend void js::ReportOverRecursed(JSContext*, unsigned errorNumber);
 
-    // Returns to the embedding to allow other cooperative threads to run. We
-    // may do this if we need access to a ZoneGroup that is in use by another
-    // thread.
-    void yieldToEmbedding() {
-        (*yieldCallback_)(this);
-    }
-
-    void setYieldCallback(js::YieldCallback callback) {
-        yieldCallback_ = callback;
-    }
-
   private:
     static JS::Error reportedError;
     static JS::OOM reportedOOM;
 
-    // This callback is used to ask the embedding to allow other cooperative
-    // threads to run. We may do this if we need access to a ZoneGroup that is
-    // in use by another thread.
-    js::ThreadLocalData<js::YieldCallback> yieldCallback_;
-
   public:
     inline JS::Result<> boolToResult(bool ok);
 
     /**
      * Intentionally awkward signpost method that is stationed on the
      * boundary between Result-using and non-Result-using code.
      */
     template <typename V, typename E>
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -106,21 +106,21 @@ class Simulator;
 //
 // Threads interacting with a runtime are divided into two categories:
 //
 // - The main thread is capable of running JS. There's at most one main thread
 //   per runtime.
 //
 // - Helper threads do not run JS, and are controlled or triggered by activity
 //   on the main thread (or main threads, since all runtimes in a process share
-//   helper threads). Helper threads may have exclusive access to zone groups
-//   created for them, for parsing and similar tasks, but their activities do
-//   not cause observable changes in script behaviors. Activity on helper
-//   threads may be referred to as happening 'off thread' or on a background
-//   thread in some parts of the VM.
+//   helper threads). Helper threads may have exclusive access to zones created
+//   for them, for parsing and similar tasks, but their activities do not cause
+//   observable changes in script behaviors. Activity on helper threads may be
+//   referred to as happening 'off thread' or on a background thread in some
+//   parts of the VM.
 
 } /* namespace js */
 
 namespace JS {
 struct RuntimeSizes;
 } // namespace JS
 
 /* Various built-in or commonly-used names pinned on first context. */
--- a/js/src/vm/TypeInference.h
+++ b/js/src/vm/TypeInference.h
@@ -1343,17 +1343,17 @@ class TypeZone
     // Under CodeGenerator::link, the id of the current compilation.
     ZoneData<mozilla::Maybe<IonCompilationId>> currentCompilationId_;
 
     TypeZone(const TypeZone&) = delete;
     void operator=(const TypeZone&) = delete;
 
   public:
     // Current generation for sweeping.
-    ZoneGroupOrGCTaskOrIonCompileData<uint32_t> generation;
+    ZoneOrGCTaskOrIonCompileData<uint32_t> generation;
 
     // During incremental sweeping, allocator holding the old type information
     // for the zone.
     ZoneData<LifoAlloc> sweepTypeLifoAlloc;
 
     // During incremental sweeping, whether to try to destroy all type
     // information attached to scripts.
     ZoneData<bool> sweepReleaseTypes;
--- a/xpcom/threads/Scheduler.cpp
+++ b/xpcom/threads/Scheduler.cpp
@@ -680,17 +680,16 @@ SchedulerImpl::ThreadController::OnStart
 
   xpc::CreateCooperativeContext();
 
   JSContext* cx = dom::danger::GetJSContext();
   mScheduler->SetJSContext(aIndex, cx);
   if (sPrefPreemption) {
     JS_AddInterruptCallback(cx, SchedulerImpl::InterruptCallback);
   }
-  js::SetCooperativeYieldCallback(cx, SchedulerImpl::YieldCallback);
   Servo_InitializeCooperativeThread();
 }
 
 void
 SchedulerImpl::ThreadController::OnStopThread(size_t aIndex)
 {
   xpc::DestroyCooperativeContext();