Closed Bug 1779247 Opened 2 years ago Closed 2 years ago

Update AsyncModuleExecution{Fulfilled,Rejected} to latest spec steps

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Following on from bug 1777972, I'd like to update AsyncModuleExecutionFulfilled and AsyncModuleExecutionRejected to the latest spec and add the spec steps in comments so we can easily check our implementation.

One issue I came across was that the spec now leaves AsyncEvaluation field set to true after evaluation has finished. That's a problem for our current implementation because we use a runtime-wide counter to assign an order to async evaluating modules, and to prevent overflow this counter is reset when the last module finishes evaluation and sets this field to false.

(In reply to Jon Coppeard (:jonco) from comment #0)

the spec now leaves AsyncEvaluation field set to true after evaluation has finished

It turns out this doesn't happen everywhere so I'm now a bit confused as to how this works.

Severity: -- → N/A
Priority: -- → P3

Currently our implementation sets the async evaluating flag to false at the end
of execution. This patch does not change this yet as it's a convenient point to
reset the moduleAsyncEvaluatingPostOrder counter, so this diverges from the
spec.

I'll file a followup bug to address this.

Depends on D151716

As for the previous patch, we still set async evaluating to false after execution.

Depends on D151717

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e7850e36813 Part 1: Move the sort operation from GatherAvailableModuleAncestors into AsyncModuleExecutionFulfilled as per the spec r=yulia https://hg.mozilla.org/integration/autoland/rev/685b4d3a7811 Part 2: Update AsyncModuleExecutionFulfilled to the latest spec and add steps r=yulia https://hg.mozilla.org/integration/autoland/rev/8f537ef57b2e Part 3: Update AsyncModuleExecutionRejected to the latest spec and add steps r=yulia
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: