mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1351102 - Fix GetFinishedBuilder to check the runtime instead of the compartment. r=h4writer
This commit is contained in:
parent
76239ccf41
commit
7d7a4a6d3e
@ -2068,13 +2068,13 @@ CompileBackEnd(MIRGenerator* mir)
|
||||
return GenerateCode(mir, lir);
|
||||
}
|
||||
|
||||
// Find a finished builder for the compartment.
|
||||
// Find a finished builder for the runtime.
|
||||
static IonBuilder*
|
||||
GetFinishedBuilder(JSContext* cx, GlobalHelperThreadState::IonBuilderVector& finished)
|
||||
{
|
||||
for (size_t i = 0; i < finished.length(); i++) {
|
||||
IonBuilder* testBuilder = finished[i];
|
||||
if (testBuilder->compartment == CompileCompartment::get(cx->compartment())) {
|
||||
if (testBuilder->script()->runtimeFromAnyThread() == cx->runtime()) {
|
||||
HelperThreadState().remove(finished, &i);
|
||||
return testBuilder;
|
||||
}
|
||||
@ -2095,10 +2095,10 @@ AttachFinishedCompilations(JSContext* cx)
|
||||
|
||||
GlobalHelperThreadState::IonBuilderVector& finished = HelperThreadState().ionFinishedList(lock);
|
||||
|
||||
// Incorporate any off thread compilations for the compartment which have
|
||||
// Incorporate any off thread compilations for the runtime which have
|
||||
// finished, failed or have been cancelled.
|
||||
while (true) {
|
||||
// Find a finished builder for the compartment.
|
||||
// Find a finished builder for the runtime.
|
||||
IonBuilder* builder = GetFinishedBuilder(cx, finished);
|
||||
if (!builder)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user