mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 3f395d9d894a (Bug 1057563) for not handling the background allocation case.
This commit is contained in:
parent
74339ca4d5
commit
f623e8e73d
@ -3219,7 +3219,7 @@ GCHelperState::finish()
|
||||
}
|
||||
|
||||
GCHelperState::State
|
||||
GCHelperState::state() const
|
||||
GCHelperState::state()
|
||||
{
|
||||
JS_ASSERT(rt->gc.currentThreadOwnsGCLock());
|
||||
return state_;
|
||||
@ -3370,15 +3370,6 @@ GCHelperState::waitBackgroundSweepOrAllocEnd()
|
||||
rt->gc.assertBackgroundSweepingFinished();
|
||||
}
|
||||
|
||||
void
|
||||
GCHelperState::assertStateIsIdle() const
|
||||
{
|
||||
#ifdef DEBUG
|
||||
AutoLockGC lock(rt);
|
||||
JS_ASSERT(state() == IDLE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Must be called with the GC lock taken. */
|
||||
inline void
|
||||
GCHelperState::startBackgroundAllocationIfIdle()
|
||||
@ -5536,16 +5527,15 @@ GCRuntime::gcCycle(bool incremental, int64_t budget, JSGCInvocationKind gckind,
|
||||
// Assert if this is a GC unsafe region.
|
||||
JS::AutoAssertOnGC::VerifyIsSafeToGC(rt);
|
||||
|
||||
// As we about to purge caches and clear the mark bits we must wait for
|
||||
// any background finalization to finish. We must also wait for the
|
||||
// background allocation to finish so we can avoid taking the GC lock
|
||||
// when manipulating the chunks during the GC.
|
||||
if (incrementalState == NO_INCREMENTAL) {
|
||||
/*
|
||||
* As we about to purge caches and clear the mark bits we must wait for
|
||||
* any background finalization to finish. We must also wait for the
|
||||
* background allocation to finish so we can avoid taking the GC lock
|
||||
* when manipulating the chunks during the GC.
|
||||
*/
|
||||
{
|
||||
gcstats::AutoPhase ap(stats, gcstats::PHASE_WAIT_BACKGROUND_THREAD);
|
||||
waitBackgroundSweepOrAllocEnd();
|
||||
} else {
|
||||
// The helper thread does not run between incremental slices.
|
||||
helperState.assertStateIsIdle();
|
||||
}
|
||||
|
||||
State prevState = incrementalState;
|
||||
|
@ -994,7 +994,7 @@ class GCHelperState
|
||||
void startBackgroundThread(State newState);
|
||||
void waitForBackgroundThread();
|
||||
|
||||
State state() const;
|
||||
State state();
|
||||
void setState(State state);
|
||||
|
||||
bool sweepFlag;
|
||||
@ -1042,9 +1042,6 @@ class GCHelperState
|
||||
/* Must be called without the GC lock taken. */
|
||||
void waitBackgroundSweepOrAllocEnd();
|
||||
|
||||
/* Must be called without the GC lock taken. */
|
||||
void assertStateIsIdle() const;
|
||||
|
||||
/* Must be called with the GC lock taken. */
|
||||
void startBackgroundAllocationIfIdle();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user