mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 13:45:27 +00:00
Backed out changeset 072392a96295 (bug 1290240) for 10.10 debug cpp test failures CLOSED TREE
This commit is contained in:
parent
e4da1cddc9
commit
1909229bf2
@ -3317,8 +3317,8 @@ GCHelperState::work()
|
||||
|
||||
AutoLockGC lock(rt);
|
||||
|
||||
MOZ_ASSERT(thread.isNothing());
|
||||
thread = mozilla::Some(ThisThread::GetId());
|
||||
MOZ_ASSERT(!thread);
|
||||
thread = PR_GetCurrentThread();
|
||||
|
||||
TraceLoggerThread* logger = TraceLoggerForCurrentThread();
|
||||
|
||||
@ -3338,7 +3338,7 @@ GCHelperState::work()
|
||||
}
|
||||
|
||||
setState(IDLE, lock);
|
||||
thread.reset();
|
||||
thread = nullptr;
|
||||
|
||||
done.notify_all();
|
||||
}
|
||||
@ -3419,7 +3419,7 @@ GCHelperState::doSweep(AutoLockGC& lock)
|
||||
bool
|
||||
GCHelperState::onBackgroundThread()
|
||||
{
|
||||
return thread.isSome() && *thread == ThisThread::GetId();
|
||||
return PR_GetCurrentThread() == thread;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "js/SliceBudget.h"
|
||||
#include "js/Vector.h"
|
||||
#include "threading/ConditionVariable.h"
|
||||
#include "threading/Thread.h"
|
||||
#include "vm/NativeObject.h"
|
||||
|
||||
namespace js {
|
||||
@ -863,8 +862,8 @@ class GCHelperState
|
||||
// Activity for the helper to do, protected by the GC lock.
|
||||
State state_;
|
||||
|
||||
// Thread which work is being performed on, if any.
|
||||
mozilla::Maybe<Thread::Id> thread;
|
||||
// Thread which work is being performed on, or null.
|
||||
PRThread* thread;
|
||||
|
||||
void startBackgroundThread(State newState, const AutoLockGC& lock,
|
||||
const AutoLockHelperThreadState& helperLock);
|
||||
@ -888,7 +887,8 @@ class GCHelperState
|
||||
explicit GCHelperState(JSRuntime* rt)
|
||||
: rt(rt),
|
||||
done(),
|
||||
state_(IDLE)
|
||||
state_(IDLE),
|
||||
thread(nullptr)
|
||||
{ }
|
||||
|
||||
void finish();
|
||||
|
Loading…
Reference in New Issue
Block a user