Closed Bug 1993582 Opened 8 months ago Closed 7 months ago

Tidy: Create JSMicroTask type alias, and use through public/MicroTask.h & CycleCollectedJSContext

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

There's this awkward API problem in the SM microtask queue. Basically, we have classes of functions which can't handle a non-JS-originated Microtask (e.g. some MicrotaskRunnable stored as a PrivateValue). However, right now the signature can't express this constraint, because everything basically works on either MicroTask or UncopyableMicroTask.

We can, and should, fix this by instead having JSMicroTask or something similar as a top level type. This would be both a .toObject and a validation of the class; but then after we know it's a JSMicroTask we can express the limitations of the API at the type level instead.

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

Some broken patches that explain basically what I mean are here. These patches get the wrapping/unwrapping wrong, but generally are what I mean.

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0a0abe40bbe8 https://hg.mozilla.org/integration/autoland/rev/8b434e72bd1e Revert "Bug 1993582 - Disambiguiate MicroTask kinds at the C++ type level r=arai,smaug" for causing hazard bustages @ Promise.cpp

Backed out for causing hazard bustages

Flags: needinfo?(mgaudet)
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Flags: needinfo?(mgaudet)
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: