Bug 1465108 - Use function pointers rather than virtual run method for GC parallel tasks r=sfink a=abillings a=RyanVM

This commit is contained in:
Jon Coppeard 2018-05-10 10:09:31 +01:00 committed by Roy Tam
commit 89e332cfec
6 changed files with 72 additions and 37 deletions

View file

@ -1144,7 +1144,7 @@ js::GCParallelTask::runFromMainThread(JSRuntime* rt)
MOZ_ASSERT(state == NotStarted);
MOZ_ASSERT(js::CurrentThreadCanAccessRuntime(rt));
uint64_t timeStart = PRMJ_Now();
run();
runTask();
duration_ = PRMJ_Now() - timeStart;
}
@ -1155,7 +1155,7 @@ js::GCParallelTask::runFromHelperThread(AutoLockHelperThreadState& locked)
AutoUnlockHelperThreadState parallelSection(locked);
gc::AutoSetThreadIsPerformingGC performingGC;
uint64_t timeStart = PRMJ_Now();
run();
runTask();
duration_ = PRMJ_Now() - timeStart;
}