diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-05-13 13:50:50 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-05-14 11:12:31 -0500 |
commit | 6a6974a15deb6edf593736cdb8043bfb93064782 (patch) | |
tree | 0ae2afffcd02967ba3fe0f0a5d3e9273811f1e6f /src/ext/Bal/test/examples/TestEngine/TestEngine.cpp | |
parent | 7d56566b7c51c49ded526466dfae6af9e1709040 (diff) | |
download | wix-6a6974a15deb6edf593736cdb8043bfb93064782.tar.gz wix-6a6974a15deb6edf593736cdb8043bfb93064782.tar.bz2 wix-6a6974a15deb6edf593736cdb8043bfb93064782.zip |
Move infinite loop detection into the hosts.
Tell the BA during Destroy whether it will be reloaded, and let the BA decide then whether it's module should be unloaded.
Show error when infinite prereq loop detected.
Only clip the exit code if they're Win32 errors.
Set related bundle type to none to avoid downgrades during preqba.
Diffstat (limited to 'src/ext/Bal/test/examples/TestEngine/TestEngine.cpp')
-rw-r--r-- | src/ext/Bal/test/examples/TestEngine/TestEngine.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp b/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp index 4c7ec1c3..5c6ed398 100644 --- a/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp +++ b/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp | |||
@@ -147,10 +147,18 @@ HRESULT TestEngine::SimulateQuit( | |||
147 | return BAEngineQuit(&args, &results); | 147 | return BAEngineQuit(&args, &results); |
148 | } | 148 | } |
149 | 149 | ||
150 | void TestEngine::UnloadBA() | 150 | void TestEngine::UnloadBA( |
151 | __in BOOL fReload | ||
152 | ) | ||
151 | { | 153 | { |
152 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; | 154 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; |
153 | BOOL fDisableUnloading = m_pCreateResults && m_pCreateResults->fDisableUnloading; | 155 | BOOTSTRAPPER_DESTROY_ARGS args = { }; |
156 | BOOTSTRAPPER_DESTROY_RESULTS results = { }; | ||
157 | |||
158 | args.cbSize = sizeof(args); | ||
159 | args.fReload = fReload; | ||
160 | |||
161 | results.cbSize = sizeof(results); | ||
154 | 162 | ||
155 | ReleaseNullMem(m_pCreateResults); | 163 | ReleaseNullMem(m_pCreateResults); |
156 | 164 | ||
@@ -158,12 +166,12 @@ void TestEngine::UnloadBA() | |||
158 | 166 | ||
159 | if (pfnDestroy) | 167 | if (pfnDestroy) |
160 | { | 168 | { |
161 | pfnDestroy(); | 169 | pfnDestroy(&args, &results); |
162 | } | 170 | } |
163 | 171 | ||
164 | if (m_hBAModule) | 172 | if (m_hBAModule) |
165 | { | 173 | { |
166 | if (!fDisableUnloading) | 174 | if (!results.fDisableUnloading) |
167 | { | 175 | { |
168 | ::FreeLibrary(m_hBAModule); | 176 | ::FreeLibrary(m_hBAModule); |
169 | } | 177 | } |