mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1165912 - Ensure HelperThread().ionLazyLinkList() is only used from the main thread. r=h4writer
This commit is contained in:
parent
49250a54bc
commit
e4ebac4d5c
@ -464,8 +464,10 @@ jit::FinishOffThreadBuilder(JSContext* cx, IonBuilder* builder)
|
||||
// Clean the references to the pending IonBuilder, if we just finished it.
|
||||
if (builder->script()->hasIonScript() && builder->script()->pendingIonBuilder() == builder)
|
||||
builder->script()->setPendingIonBuilder(cx, nullptr);
|
||||
|
||||
// If the builder is still in one of the helper thread list, then remove it.
|
||||
if (builder->isInList())
|
||||
builder->remove();
|
||||
builder->removeFrom(HelperThreadState().ionLazyLinkList());
|
||||
|
||||
// Clear the recompiling flag of the old ionScript, since we continue to
|
||||
// use the old ionScript if recompiling fails.
|
||||
@ -579,7 +581,7 @@ jit::LazyLinkTopActivation(JSContext* cx)
|
||||
OnIonCompilationInfo info(builder->alloc().lifoAlloc());
|
||||
|
||||
// Remove from pending.
|
||||
builder->remove();
|
||||
builder->removeFrom(HelperThreadState().ionLazyLinkList());
|
||||
|
||||
{
|
||||
AutoEnterAnalysis enterTypes(cx);
|
||||
|
@ -146,7 +146,8 @@ class GlobalHelperThreadState
|
||||
return ionFinishedList_;
|
||||
}
|
||||
IonBuilderList& ionLazyLinkList() {
|
||||
MOZ_ASSERT(isLocked());
|
||||
MOZ_ASSERT(TlsPerThreadData.get()->runtimeFromMainThread(),
|
||||
"Should only be mutated by the main thread.");
|
||||
return ionLazyLinkList_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user