-
- Downloads
Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current...
Bug 1696397: Move SpinEventLoopUntilOrShutdown to -Quit and move the current shutdown state logic from nsThreadManager to AppShutdown; r=kmag,xpcom-reviewers The SpinEventLoopUntilOrShutdown is interrupted in the main process only at stage "xpcom-shutdown", which is too late. In a content process instead we interrupt it early enough, at "content-child-will-shutdown". This patch removes the current observer logic in nsThreadManager in favor of a current shutdown phase state machinery in AppShutdown and renames SpinEventLoopUntilOrShutdown to SpinEventLoopUntilOrQuit. It also ensures that SpinEventLoopUntilOrQuit breaks early (at "quit-application" in the main process). For a further possible cleanup around shutdown state in child and parent process please refer to bug 1697745. We have no automated test for this edge case, but we have diagnostic telemetry that will tell us if it helps. Differential Revision: https://phabricator.services.mozilla.com/D107619
Showing
- browser/base/content/tabbrowser.js 1 addition, 1 deletionbrowser/base/content/tabbrowser.js
- dom/ipc/ContentChild.cpp 5 additions, 0 deletionsdom/ipc/ContentChild.cpp
- layout/build/nsLayoutStatics.cpp 0 additions, 2 deletionslayout/build/nsLayoutStatics.cpp
- toolkit/components/passwordmgr/LoginManagerAuthPrompter.jsm 1 addition, 1 deletiontoolkit/components/passwordmgr/LoginManagerAuthPrompter.jsm
- toolkit/components/prompts/src/Prompter.jsm 1 addition, 1 deletiontoolkit/components/prompts/src/Prompter.jsm
- toolkit/content/widgets/browser-custom-element.js 1 addition, 1 deletiontoolkit/content/widgets/browser-custom-element.js
- xpcom/base/AppShutdown.cpp 10 additions, 0 deletionsxpcom/base/AppShutdown.cpp
- xpcom/base/AppShutdown.h 2 additions, 0 deletionsxpcom/base/AppShutdown.h
- xpcom/base/ClearOnShutdown.cpp 2 additions, 2 deletionsxpcom/base/ClearOnShutdown.cpp
- xpcom/base/ClearOnShutdown.h 2 additions, 2 deletionsxpcom/base/ClearOnShutdown.h
- xpcom/threads/nsIThreadManager.idl 2 additions, 2 deletionsxpcom/threads/nsIThreadManager.idl
- xpcom/threads/nsThreadManager.cpp 18 additions, 93 deletionsxpcom/threads/nsThreadManager.cpp
- xpcom/threads/nsThreadManager.h 5 additions, 5 deletionsxpcom/threads/nsThreadManager.h
Loading
Please register or sign in to comment