Closed Bug 1546158 Opened 6 years ago Closed 6 years ago

Add option to EnsureMTA to forcibly dispatch events to its thread

Categories

(Core :: IPC: MSCOM, task, P1)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

Attachments

(1 file)

In sandboxed processes with Win32k lockdown, when we initialize COM using an MTA on a background thread, the main thread is automatically initialized by the COM runtime as having an implicit MTA.

This is fine, except for the fact that if we want to enqueue any work that needs to operate specifically on the EnsureMTA thread, it won't happen.

We can add a flag to EnsureMTA's constructor that ensures that, even if the current thread is in an MTA (implicit or otherwise), we still forcibly enqueue the closure specifically to the EnsureMTA thread.

In sandboxed processes with Win32k lockdown, when we initialize COM using an MTA
on a background thread, the main thread is automatically initialized by the COM
runtime as having an implicit MTA.

This is fine, except for the fact that if we want to enqueue any work that needs
to operate specifically on the EnsureMTA thread, it won't happen.

This patch adds a flag to EnsureMTA's constructor that ensures that, even if the
current thread is in an MTA (implicit or otherwise), we still forcibly enqueue
the closure specifically to the EnsureMTA thread.

Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e3a2ecafdaa Add option to mscom::EnsureMTA to forcibly dispatch events to its thread; r=Jamie
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: