Bug 1788977 - Consolidate methods for finishing off-thread JS parse/decode. r=arai

Off-thread parse and decode all generate JS::Stencils so the various
specializations are not needed for methods that collect the results back to
main-thread.

Depends on D156335

Differential Revision: https://phabricator.services.mozilla.com/D156336
This commit is contained in:
Ted Campbell
2022-09-06 12:01:35 +00:00
parent db4c7cad42
commit d2f16d6095
13 changed files with 44 additions and 179 deletions

View File

@@ -5827,7 +5827,7 @@ static bool FinishOffThreadCompileToStencil(JSContext* cx, unsigned argc,
JS::OffThreadToken* token = job->waitUntilDone(cx);
MOZ_ASSERT(token);
RefPtr<JS::Stencil> stencil = JS::FinishCompileToStencilOffThread(cx, token);
RefPtr<JS::Stencil> stencil = JS::FinishOffThreadStencil(cx, token);
DeleteOffThreadJob(cx, job);
if (!stencil) {
return false;
@@ -5923,7 +5923,7 @@ static bool FinishOffThreadCompileModuleToStencil(JSContext* cx, unsigned argc,
MOZ_ASSERT(token);
RefPtr<JS::Stencil> stencil =
JS::FinishCompileModuleToStencilOffThread(cx, token);
JS::FinishOffThreadStencil(cx, token);
DeleteOffThreadJob(cx, job);
if (!stencil) {
return false;
@@ -6033,7 +6033,7 @@ static bool FinishOffThreadDecodeStencil(JSContext* cx, unsigned argc,
JS::OffThreadToken* token = job->waitUntilDone(cx);
MOZ_ASSERT(token);
RefPtr<JS::Stencil> stencil = JS::FinishDecodeStencilOffThread(cx, token);
RefPtr<JS::Stencil> stencil = JS::FinishOffThreadStencil(cx, token);
DeleteOffThreadJob(cx, job);
if (!stencil) {
return false;