Bug 1081283 - Use the correct calling convention on InitDwriteBG; r=jrmuizel

Otherwise our stack is misaligned by the time we return from this.
This misalignment doesn't cause a crash with the Winodws thread
startup code, but it does with ASAN because it does many things
after the thread entry point exits.

--HG--
extra : rebase_source : 6143788976d8efc9dc5c96030de3b8026d6bbc0f
This commit is contained in:
Ehsan Akhgari 2014-10-10 18:30:46 -04:00
Родитель d5c7fe43fd
Коммит d88bdea714
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -2853,7 +2853,7 @@ static void LogRegistryEvent(const wchar_t *msg)
#endif
static DWORD InitDwriteBG(LPVOID lpdwThreadParam)
static DWORD WINAPI InitDwriteBG(LPVOID lpdwThreadParam)
{
SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_BEGIN);
LOGREGISTRY(L"loading dwrite.dll");
@ -3043,8 +3043,7 @@ XREMain::XRE_mainInit(bool* aExitFlag)
// FntCache service is ready by the time it's needed.
if (IsVistaOrLater()) {
CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)&InitDwriteBG,
nullptr, 0, nullptr);
CreateThread(nullptr, 0, &InitDwriteBG, nullptr, 0, nullptr);
}
}
#endif