Bug 1795958: don't block windows package manager operations on successful completion of async operations. r=rkraesig

I've been unable to find confirmation of this (there is basically zero guidance on how to work with these from plain C++ as far as I can tell), but the available states imply that async operations will begin in Started, and then change to one of the other ones later.

Differential Revision: https://phabricator.services.mozilla.com/D159797
This commit is contained in:
Ben Hearsum 2022-10-20 16:05:59 +00:00
Родитель baad7da439
Коммит fe0d32d830
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -196,7 +196,9 @@ nsWindowsPackageManager::GetCampaignId(nsAString& aCampaignId) {
AsyncStatus status;
do {
asyncInfo->get_Status(&status);
} while (status != AsyncStatus::Completed);
} while (status == AsyncStatus::Started);
if (status != AsyncStatus::Completed) return NS_ERROR_FAILURE;
ComPtr<IStoreProductResult> productResult = nullptr;
hr = asyncSpr->GetResults(&productResult);
@ -249,7 +251,9 @@ nsWindowsPackageManager::GetCampaignId(nsAString& aCampaignId) {
AsyncStatus status;
do {
asyncInfo->get_Status(&status);
} while (status != AsyncStatus::Completed);
} while (status == AsyncStatus::Started);
if (status != AsyncStatus::Completed) return NS_ERROR_FAILURE;
ComPtr<IStoreAppLicense> license = nullptr;
hr = asyncSal->GetResults(&license);