diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-08-03 15:41:18 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-08-04 10:03:57 -0500 |
| commit | 6d7a275edafb3ae0f3cff94d66503a82dafb71f7 (patch) | |
| tree | fae8f75e2cd1d7b179b0ed93e15625d68ba7c441 /src/burn/engine/uithread.cpp | |
| parent | ed57d171f6fb6bb4e180696cc12caa568599566a (diff) | |
| download | wix-6d7a275edafb3ae0f3cff94d66503a82dafb71f7.tar.gz wix-6d7a275edafb3ae0f3cff94d66503a82dafb71f7.tar.bz2 wix-6d7a275edafb3ae0f3cff94d66503a82dafb71f7.zip | |
Replace static cache internals with a struct.
Initialize them explicitly to make it clearer when that happens.
Diffstat (limited to 'src/burn/engine/uithread.cpp')
| -rw-r--r-- | src/burn/engine/uithread.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/burn/engine/uithread.cpp b/src/burn/engine/uithread.cpp index 433cb171..986342b2 100644 --- a/src/burn/engine/uithread.cpp +++ b/src/burn/engine/uithread.cpp | |||
| @@ -16,7 +16,7 @@ struct UITHREAD_CONTEXT | |||
| 16 | 16 | ||
| 17 | struct UITHREAD_INFO | 17 | struct UITHREAD_INFO |
| 18 | { | 18 | { |
| 19 | BOOL fElevated; | 19 | BOOL fElevatedEngine; |
| 20 | BURN_USER_EXPERIENCE* pUserExperience; | 20 | BURN_USER_EXPERIENCE* pUserExperience; |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| @@ -105,10 +105,10 @@ static DWORD WINAPI ThreadProc( | |||
| 105 | MSG msg = { }; | 105 | MSG msg = { }; |
| 106 | 106 | ||
| 107 | BURN_ENGINE_STATE* pEngineState = pContext->pEngineState; | 107 | BURN_ENGINE_STATE* pEngineState = pContext->pEngineState; |
| 108 | BOOL fElevated = BURN_MODE_ELEVATED == pContext->pEngineState->mode; | 108 | BOOL fElevatedEngine = BURN_MODE_ELEVATED == pContext->pEngineState->mode; |
| 109 | 109 | ||
| 110 | // If elevated, set up the thread local storage to store the correct pipe to communicate logging. | 110 | // If elevated, set up the thread local storage to store the correct pipe to communicate logging. |
| 111 | if (fElevated) | 111 | if (fElevatedEngine) |
| 112 | { | 112 | { |
| 113 | Assert(TLS_OUT_OF_INDEXES != pEngineState->dwElevatedLoggingTlsId); | 113 | Assert(TLS_OUT_OF_INDEXES != pEngineState->dwElevatedLoggingTlsId); |
| 114 | 114 | ||
| @@ -130,7 +130,7 @@ static DWORD WINAPI ThreadProc( | |||
| 130 | 130 | ||
| 131 | fRegistered = TRUE; | 131 | fRegistered = TRUE; |
| 132 | 132 | ||
| 133 | info.fElevated = fElevated; | 133 | info.fElevatedEngine = fElevatedEngine; |
| 134 | info.pUserExperience = &pEngineState->userExperience; | 134 | info.pUserExperience = &pEngineState->userExperience; |
| 135 | 135 | ||
| 136 | // Create the window to handle reboots without activating it. | 136 | // Create the window to handle reboots without activating it. |
| @@ -199,7 +199,7 @@ static LRESULT CALLBACK WndProc( | |||
| 199 | 199 | ||
| 200 | // Always block shutdown in the elevated process, but ask the BA in the non-elevated. | 200 | // Always block shutdown in the elevated process, but ask the BA in the non-elevated. |
| 201 | UITHREAD_INFO* pInfo = reinterpret_cast<UITHREAD_INFO*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA)); | 201 | UITHREAD_INFO* pInfo = reinterpret_cast<UITHREAD_INFO*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA)); |
| 202 | if (!pInfo->fElevated) | 202 | if (!pInfo->fElevatedEngine) |
| 203 | { | 203 | { |
| 204 | // TODO: instead of recommending canceling all non-critical shutdowns, maybe we should only recommend cancel | 204 | // TODO: instead of recommending canceling all non-critical shutdowns, maybe we should only recommend cancel |
| 205 | // when the engine is doing work? | 205 | // when the engine is doing work? |
| @@ -209,7 +209,7 @@ static LRESULT CALLBACK WndProc( | |||
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | fRet = !fCancel; | 211 | fRet = !fCancel; |
| 212 | LogId(REPORT_STANDARD, MSG_SYSTEM_SHUTDOWN, LoggingBoolToString(fCritical), LoggingBoolToString(pInfo->fElevated), LoggingBoolToString(fRet)); | 212 | LogId(REPORT_STANDARD, MSG_SYSTEM_SHUTDOWN, LoggingBoolToString(fCritical), LoggingBoolToString(pInfo->fElevatedEngine), LoggingBoolToString(fRet)); |
| 213 | return fRet; | 213 | return fRet; |
| 214 | } | 214 | } |
| 215 | 215 | ||
