Closed Bug 1267368 Opened 8 years ago Closed 8 years ago

Initialize the content process main thread to the COM multithreaded apartment

Categories

(Core :: DOM: Content Processes, defect)

Unspecified
Windows
defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
e10s + ---
firefox48 --- affected

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

Attachments

(1 file)

Since the content process does not directly call Windows GUI APIs, we should initialize its main thread to the multithreaded apartment. This offers significant performance and stability benefits due since we can avoid marshaling inter-thread method invocations through the Windows message pump.

This is also required for a11y+e10s to successfully hand off method invocations from the RPC thread pool to the content process main thread.


I do see some gfx code that is initializing on the STA. I'll discuss with gfx to find out what the true requirements are... in my experience a lot of code just does STA because somebody needed COM, didn't know how apartments worked, but also didn't care as long as it worked. :-)
Blocks: 1263224
No longer blocks: 1258839
Attached patch Proposed patchSplinter Review
This only #ifdefs on XP_WIN, not on a11y. My reasoning for this is that if we're going to switch to MTA on the main thread, that should be enforced across all configurations so that we don't end up unexpectedly confusing people.
It turns out that ICallFrame objects are okay to handoff between apartments, so we're okay here.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: