Bug 1359245 - Fix compiler error on CLOSED TREE
MozReview-Commit-ID: 57cVUcTV1Rv
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -7403,17 +7403,16 @@ AutoAssertNoNurseryAlloc::AutoAssertNoNu
}
AutoAssertNoNurseryAlloc::~AutoAssertNoNurseryAlloc()
{
TlsContext.get()->allowNurseryAlloc();
}
JS::AutoEnterCycleCollection::AutoEnterCycleCollection(JSRuntime* rt)
- : runtime(rt)
{
MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy());
TlsContext.get()->heapState = HeapState::CycleCollecting;
}
JS::AutoEnterCycleCollection::~AutoEnterCycleCollection()
{
MOZ_ASSERT(JS::CurrentThreadIsHeapCycleCollecting());
--- a/js/src/jspubtd.h
+++ b/js/src/jspubtd.h
@@ -196,18 +196,16 @@ CurrentThreadIsHeapCycleCollecting()
return CurrentThreadHeapState() == HeapState::CycleCollecting;
}
// Decorates the Unlinking phase of CycleCollection so that accidental use
// of barriered accessors results in assertions instead of leaks.
class MOZ_STACK_CLASS JS_PUBLIC_API(AutoEnterCycleCollection)
{
#ifdef DEBUG
- JSRuntime* runtime;
-
public:
explicit AutoEnterCycleCollection(JSRuntime* rt);
~AutoEnterCycleCollection();
#else
public:
explicit AutoEnterCycleCollection(JSRuntime* rt) {}
~AutoEnterCycleCollection() {}
#endif