Skip to content

Commit

Permalink
Backed out changeset 48e363362718 (bug 1308039)
Browse files Browse the repository at this point in the history
UltraBlame original commit: 8ee921cb1b8512917c15a974a0540ac9da959509
  • Loading branch information
marco-c committed Sep 30, 2019
1 parent 5b4b3ce commit c7d94d7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
16 changes: 0 additions & 16 deletions js/public/GCAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,20 +524,6 @@ class JS_PUBLIC_API(AutoAssertNoAlloc)



class JS_PUBLIC_API(AutoAssertOnBarrier)
{
JSContext* context;
bool prev;

public:
explicit AutoAssertOnBarrier(JSContext* cx);
~AutoAssertOnBarrier();
};








Expand Down Expand Up @@ -623,7 +609,6 @@ ExposeGCThingToActiveJS(JS::GCCellPtr thing)
if (IsInsideNursery(thing.asCell()))
return;
JS::shadow::Runtime* rt = detail::GetGCThingRuntime(thing.unsafeAsUIntPtr());
MOZ_DIAGNOSTIC_ASSERT(rt->allowGCBarriers());
if (IsIncrementalBarrierNeededOnTenuredGCThing(rt, thing))
JS::IncrementalReferenceBarrier(thing);
else if (JS::GCThingIsMarkedGray(thing))
Expand All @@ -634,7 +619,6 @@ static MOZ_ALWAYS_INLINE void
MarkGCThingAsLive(JSRuntime* aRt, JS::GCCellPtr thing)
{
JS::shadow::Runtime* rt = JS::shadow::Runtime::asShadowRuntime(aRt);
MOZ_DIAGNOSTIC_ASSERT(rt->allowGCBarriers());



Expand Down
14 changes: 0 additions & 14 deletions js/src/jsgc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7013,20 +7013,6 @@ JS::AutoAssertOnGC::~AutoAssertOnGC()
}
}

JS::AutoAssertOnBarrier::AutoAssertOnBarrier(JSContext* cx)
: context(cx),
prev(cx->runtime()->allowGCBarriers())
{
context->runtime()->allowGCBarriers_ = false;
}

JS::AutoAssertOnBarrier::~AutoAssertOnBarrier()
{
MOZ_ASSERT(!context->runtime()->allowGCBarriers_);
context->runtime()->allowGCBarriers_ = prev;
}

#ifdef DEBUG
JS::AutoAssertNoAlloc::AutoAssertNoAlloc(JSContext* cx)
: gc(nullptr)
{
Expand Down
9 changes: 0 additions & 9 deletions js/src/jspubtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ class StoreBuffer;
namespace JS {

class JS_PUBLIC_API(AutoEnterCycleCollection);
class JS_PUBLIC_API(AutoAssertOnBarrier);
struct PropertyDescriptor;

typedef void (*OffThreadCompileCallback)(void* token, void* callbackData);
Expand All @@ -154,17 +153,11 @@ struct Runtime
friend class JS::AutoEnterCycleCollection;
JS::HeapState heapState_;



bool allowGCBarriers_;
friend class JS::AutoAssertOnBarrier;

js::gc::StoreBuffer* gcStoreBufferPtr_;

public:
Runtime()
: heapState_(JS::HeapState::Idle)
, allowGCBarriers_(true)
, gcStoreBufferPtr_(nullptr)
{}

Expand All @@ -176,8 +169,6 @@ struct Runtime
return heapState_ == JS::HeapState::CycleCollecting;
}

bool allowGCBarriers() const { return allowGCBarriers_; }

js::gc::StoreBuffer* gcStoreBufferPtr() { return gcStoreBufferPtr_; }

static JS::shadow::Runtime* asShadowRuntime(JSRuntime* rt) {
Expand Down

0 comments on commit c7d94d7

Please sign in to comment.