Bug 1571516 - Add diagnostics for startup crash. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D135685
This commit is contained in:
Christian Holler 2022-01-12 10:14:00 +00:00
parent f14d782241
commit 9b397f2ea0

View File

@ -534,11 +534,13 @@ nsresult nsAppShell::Init() {
wc.hbrBackground = (HBRUSH) nullptr;
wc.lpszMenuName = (LPCWSTR) nullptr;
wc.lpszClassName = kWindowClass;
RegisterClassW(&wc);
ATOM wcA = RegisterClassW(&wc);
MOZ_DIAGNOSTIC_ASSERT(wcA, "RegisterClassW for EventWindowClass failed");
}
mEventWnd = CreateWindowW(kWindowClass, L"nsAppShell:EventWindow", 0, 0, 0,
10, 10, HWND_MESSAGE, nullptr, module, nullptr);
MOZ_DIAGNOSTIC_ASSERT(mEventWnd, "CreateWindowW for EventWindow failed");
NS_ENSURE_STATE(mEventWnd);
} else if (XRE_IsContentProcess() && !IsWin32kLockedDown()) {
// We're not generally processing native events, but still using GDI and we