Use non-UI message pump(s) in the content process
Categories
(Core :: DOM: Content Processes, enhancement, P5)
Tracking
()
People
(Reporter: Alex_Gaynor, Assigned: jimm)
References
(Blocks 1 open bug)
Details
(Whiteboard: sb+, tpi:+)
Attachments
(3 obsolete files)
Reporter | ||
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Reporter | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Reporter | ||
Comment 6•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Reporter | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
We're still initializing a UI main thread here, this results in various calls plus a bunch of COM stuff.
example stacks:
3 - win32u!NtUserQueryWindow
win32u!NtUserQueryWindow
user32!GetWindowThreadProcessId+0x83
xul!`anonymous
xul!mozilla::ipc::windows::InitUIThread+0x1b9
xul!XRE_InitChildProcess+0xa13
xul!mozilla::BootstrapImpl::XRE_InitChildProcess+0x2a
firefox!content_process_main+0xe4
firefox!NS_internal_main+0x117
3 - win32u!NtUserGetProcessWindowStation
win32u!NtUserGetProcessWindowStation
combase!CRpcResolver::GetThreadWinstaDesktop+0x6a
combase!<lambda_42f1a29483ec03d26359468a17427162>::operator()+0x85
combase!CRpcResolver::GetConnection+0x8c
combase!CoInitializeSecurity+0xb0
xul!mozilla::mscom::ProcessRuntime::InitializeSecurity+0xcfd
xul!mozilla::mscom::ProcessRuntime::InitInsideApartment+0x65
xul!mozilla::mscom::ProcessRuntime::ProcessRuntime+0x21a
xul!mozilla::mscom::ProcessRuntime::ProcessRuntime+0x24
xul!mozilla::dom::ContentProcess::ContentProcess+0x72
xul!XRE_InitChildProcess+0xb22
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 9•6 years ago
|
||
This is built on top of bug 1381938. Looks like the event pump stuff in nsAppShell can just come out, although we may want to keep it around for a bit for testing.
Assignee | ||
Comment 10•6 years ago
|
||
Looks like we need some touch up work here as well -
https://searchfox.org/mozilla-central/source/ipc/mscom/ProcessRuntime.cpp#58
This code which runs really early can't detect 'mozilla.widget.disable-native-theme-for-content' though. It ends up calling CoInitializeEx which fails.
Comment 11•6 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #10)
Looks like we need some touch up work here as well -
https://searchfox.org/mozilla-central/source/ipc/mscom/ProcessRuntime.cpp#58This code which runs really early can't detect 'mozilla.widget.disable-native-theme-for-content' though. It ends up calling CoInitializeEx which fails.
What's the problem here, exactly? That code is written to use the MTA when Win32k lockdown is turned on. Until that happens, it still uses the STA.
Assignee | ||
Comment 12•6 years ago
|
||
com init area still needs to be sorted out.
Assignee | ||
Comment 13•6 years ago
|
||
(In reply to Aaron Klotz [:aklotz] from comment #11)
(In reply to Jim Mathies [:jimm] from comment #10)
Looks like we need some touch up work here as well -
https://searchfox.org/mozilla-central/source/ipc/mscom/ProcessRuntime.cpp#58This code which runs really early can't detect 'mozilla.widget.disable-native-theme-for-content' though. It ends up calling CoInitializeEx which fails.
What's the problem here, exactly? That code is written to use the MTA when
Win32k lockdown is turned on. Until that happens, it still uses the STA.
with native events turned off the init call seemed to fail. I had some other stuff turned on so I'll check it again.
Assignee | ||
Comment 14•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 16•6 years ago
|
||
I still see this in stacks -
28 - win32u!NtUserCallOneParam
win32u!NtUserCallOneParam
xul!base::MessagePumpForUI::ProcessNextWindowsMessage
xul!mozilla::ipc::MessagePumpForNonMainUIThreads::DoRunLoop
xul!base::MessagePumpWin::RunWithDispatcher
xul!base::MessagePumpWin::Run
xul!MessageLoop::RunInternal
xul!MessageLoop::RunHandler
So I think we still need to touch up the type of chromium message pump we're using.
Comment 17•6 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #16)
I still see this in stacks -
28 - win32u!NtUserCallOneParam
win32u!NtUserCallOneParam
xul!base::MessagePumpForUI::ProcessNextWindowsMessage
xul!mozilla::ipc::MessagePumpForNonMainUIThreads::DoRunLoop
xul!base::MessagePumpWin::RunWithDispatcher
xul!base::MessagePumpWin::Run
xul!MessageLoop::RunInternal
xul!MessageLoop::RunHandlerSo I think we still need to touch up the type of chromium message pump we're using.
I take it that's not on the main thread though?
Assignee | ||
Comment 18•6 years ago
|
||
(In reply to Bob Owen (:bobowen) from comment #17)
(In reply to Jim Mathies [:jimm] from comment #16)
I still see this in stacks -
28 - win32u!NtUserCallOneParam
win32u!NtUserCallOneParam
xul!base::MessagePumpForUI::ProcessNextWindowsMessage
xul!mozilla::ipc::MessagePumpForNonMainUIThreads::DoRunLoop
xul!base::MessagePumpWin::RunWithDispatcher
xul!base::MessagePumpWin::Run
xul!MessageLoop::RunInternal
xul!MessageLoop::RunHandlerSo I think we still need to touch up the type of chromium message pump we're using.
I take it that's not on the main thread though?
No apparently not. Look like it might be one of these two -
which doesn't look like much fun.
Assignee | ||
Updated•6 years ago
|
Updated•5 years ago
|
Comment 19•4 years ago
|
||
jya pointed out part of this may have been done during bug 1260828.
Comment 20•4 years ago
|
||
As far as I can tell this has now been resolved.
In the main loop we will stop pumping native events after bug 1701802 (when win32k lockdown is enabled).
Others uses should have been removed by work in bug 1260828, its only dependencies are for things in the GPU and GMP process.
Description
•