Skip to content

Commit 8a77777

Browse files
authored
Revert "[1.8-stable CP] Fix: Deployment exceptions masked as ERROR_UNHANDLED_EXCEPTION; SetLastFailure logging single chars (#6330)" (#6392)
This reverts commit 2a2a5dc.
1 parent 066f021 commit 8a77777

6 files changed

Lines changed: 12 additions & 70 deletions

File tree

dev/Deployment/DeploymentActivityContext.cpp

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55

66
#include "DeploymentActivityContext.h"
77

8-
#include <FrameworkUdk/Containment.h>
9-
10-
// Bug 61543987: [1.8 servicing] Deployment exceptions masked as ERROR_UNHANDLED_EXCEPTION; SetLastFailure logging single chars
11-
#define WINAPPSDK_CHANGEID_61543987 61543987, WinAppSDK_1_8_7
12-
138
WindowsAppRuntime::Deployment::Activity::Context& WindowsAppRuntime::Deployment::Activity::Context::Get()
149
{
1510
return g_DeploymentActivityContext;
@@ -42,14 +37,7 @@ void WindowsAppRuntime::Deployment::Activity::Context::SetLastFailure(const wil:
4237

4338
if (failure.pszFile)
4439
{
45-
if (WinAppSdk::Containment::IsChangeEnabled<WINAPPSDK_CHANGEID_61543987>())
46-
{
47-
m_lastFailure.file = failure.pszFile;
48-
}
49-
else
50-
{
51-
m_lastFailure.file = *failure.pszFile;
52-
}
40+
m_lastFailure.file = *failure.pszFile;
5341
}
5442
else
5543
{
@@ -60,14 +48,7 @@ void WindowsAppRuntime::Deployment::Activity::Context::SetLastFailure(const wil:
6048

6149
if (failure.pszMessage)
6250
{
63-
if (WinAppSdk::Containment::IsChangeEnabled<WINAPPSDK_CHANGEID_61543987>())
64-
{
65-
m_lastFailure.message = failure.pszMessage;
66-
}
67-
else
68-
{
69-
m_lastFailure.message = *failure.pszMessage;
70-
}
51+
m_lastFailure.message = *failure.pszMessage;
7152
}
7253
else
7354
{
@@ -76,14 +57,7 @@ void WindowsAppRuntime::Deployment::Activity::Context::SetLastFailure(const wil:
7657

7758
if (failure.pszModule)
7859
{
79-
if (WinAppSdk::Containment::IsChangeEnabled<WINAPPSDK_CHANGEID_61543987>())
80-
{
81-
m_lastFailure.module = failure.pszModule;
82-
}
83-
else
84-
{
85-
m_lastFailure.module = *failure.pszModule;
86-
}
60+
m_lastFailure.module = *failure.pszModule;
8761
}
8862
else
8963
{

dev/Deployment/DeploymentManager.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
// Bug 61124029: [1.8 servicing] Fixing reset activity data on deployment initialization
1919
#define WINAPPSDK_CHANGEID_61124029 61124029, WinAppSDK_1_8_6
2020

21-
// Bug 61543987: [1.8 servicing] Deployment exceptions masked as ERROR_UNHANDLED_EXCEPTION; SetLastFailure logging single chars
22-
#define WINAPPSDK_CHANGEID_61543987 61543987, WinAppSDK_1_8_7
23-
2421
using namespace winrt;
2522
using namespace winrt::Windows::Foundation;
2623

@@ -212,25 +209,17 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
212209
{
213210
deploymentResult = _Initialize(initializeActivityContext, packageFullName, deploymentInitializeOptions, isRepair);
214211
}
215-
catch (...)
212+
catch (winrt::hresult_error const& e)
216213
{
217-
const HRESULT hr = []() -> HRESULT {
218-
if (WinAppSdk::Containment::IsChangeEnabled<WINAPPSDK_CHANGEID_61543987>())
219-
{
220-
return wil::ResultFromCaughtException();
221-
}
222-
try { throw; }
223-
catch (winrt::hresult_error const& e) { return e.code(); }
224-
// Non-winrt::hresult_error exceptions propagate (old behavior)
225-
}();
214+
const HRESULT hr{ e.code() };
226215

227216
auto packageIdentity{ AppModel::Identity::PackageIdentity::FromPackageFullName(packageFullName.c_str()) };
228217
PCWSTR c_packageNamePrefix{ L"microsoft.windowsappruntime." };
229218
const size_t c_packageNamePrefixLength{ ARRAYSIZE(L"microsoft.windowsappruntime.") - 1 };
230219
std::wstring release;
231220
if (CompareStringOrdinal(packageIdentity.Name(), -1, c_packageNamePrefix, -1, TRUE) == CSTR_EQUAL)
232221
{
233-
release = packageIdentity.Name() + c_packageNamePrefixLength;
222+
release = packageIdentity.Name() + c_packageNamePrefixLength;
234223
}
235224
else
236225
{
@@ -253,7 +242,7 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
253242

254243
THROW_HR_MSG(hr, "PackageFullName=%ls Options: ForceDeployment=%c OnErrorShowUI=%c isRepair:%c",
255244
packageFullName.c_str(), deploymentInitializeOptions.ForceDeployment() ? 'Y' : 'N',
256-
deploymentInitializeOptions.OnErrorShowUI() ? 'Y' : 'N', isRepair ? 'Y' : 'N');
245+
deploymentInitializeOptions.OnErrorShowUI() ? 'Y' : 'N', isRepair ? 'Y' : 'N' );
257246
}
258247

259248
// Success!

dev/RuntimeCompatibilityOptions/RuntimeCompatibilityOptions.idl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime
3636
TextIntelligence_Insights = 61106039,
3737

3838
// 1.8.7
39-
DeploymentManager_DiagnosabilityFix = 61543987,
4039
LanguageModel_ProcessingFix = 61200617,
4140
ImageDescription_ConcurrencyFix = 61350696,
4241
LanguageModel_ContentErrorHandlingFix = 61352166,

dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void WindowsAppRuntime::MddBootstrap::Activity::Context::SetLastFailure(const wi
1818

1919
if (failure.pszFile)
2020
{
21-
m_lastFailure.file = failure.pszFile;
21+
m_lastFailure.file = *failure.pszFile;
2222
}
2323
else
2424
{
@@ -29,7 +29,7 @@ void WindowsAppRuntime::MddBootstrap::Activity::Context::SetLastFailure(const wi
2929

3030
if (failure.pszMessage)
3131
{
32-
m_lastFailure.message = failure.pszMessage;
32+
m_lastFailure.message = *failure.pszMessage;
3333
}
3434
else
3535
{
@@ -38,7 +38,7 @@ void WindowsAppRuntime::MddBootstrap::Activity::Context::SetLastFailure(const wi
3838

3939
if (failure.pszModule)
4040
{
41-
m_lastFailure.module = failure.pszModule;
41+
m_lastFailure.module = *failure.pszModule;
4242
}
4343
else
4444
{

dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <Windows.h>
55
#include <stdint.h>
66
#include <stdlib.h>
7-
87
#include <MddBootstrap.h>
98
#include <WindowsAppSDK-VersionInfo.h>
109

installer/dev/InstallActivityContext.cpp

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
#include "pch.h"
55
#include "InstallActivityContext.h"
66

7-
#include <FrameworkUdk/Containment.h>
8-
9-
// Bug 61543987: [1.8 servicing] Deployment exceptions masked as ERROR_UNHANDLED_EXCEPTION; SetLastFailure logging single chars
10-
#define WINAPPSDK_CHANGEID_61543987 61543987, WinAppSDK_1_8_7
11-
127
WindowsAppRuntimeInstaller::InstallActivity::Context& WindowsAppRuntimeInstaller::InstallActivity::Context::Get()
138
{
149
return g_installActivityContext;
@@ -42,14 +37,7 @@ void WindowsAppRuntimeInstaller::InstallActivity::Context::SetLastFailure(const
4237

4338
if (failure.pszFile)
4439
{
45-
if (WinAppSdk::Containment::IsChangeEnabled<WINAPPSDK_CHANGEID_61543987>())
46-
{
47-
m_lastFailure.file = failure.pszFile;
48-
}
49-
else
50-
{
51-
m_lastFailure.file = *failure.pszFile;
52-
}
40+
m_lastFailure.file = *failure.pszFile;
5341
}
5442
else
5543
{
@@ -60,14 +48,7 @@ void WindowsAppRuntimeInstaller::InstallActivity::Context::SetLastFailure(const
6048

6149
if (failure.pszMessage)
6250
{
63-
if (WinAppSdk::Containment::IsChangeEnabled<WINAPPSDK_CHANGEID_61543987>())
64-
{
65-
m_lastFailure.message = failure.pszMessage;
66-
}
67-
else
68-
{
69-
m_lastFailure.message = *failure.pszMessage;
70-
}
51+
m_lastFailure.message = *failure.pszMessage;
7152
}
7253
else
7354
{

0 commit comments

Comments
 (0)