Backed out 2 changesets (bug 1602195) for toolkit/components/alerts/test/test_alerts.html failures CLOSED TREE

Backed out changeset 399d66c91450 (bug 1602195)
Backed out changeset c007b95a362c (bug 1602195)
This commit is contained in:
Bogdan Tara
2019-12-19 03:50:16 +02:00
parent 9f976bb6e6
commit 47166f5f0a
8 changed files with 31 additions and 126 deletions

View File

@@ -9,7 +9,5 @@ interface nsIFile;
[scriptable, uuid(fb9b59db-5a91-4e67-92b6-35e7d6e6d3fd)]
interface nsIWindowsShellService : nsISupports
{
void createShortcut(in nsIFile aBinary, in Array<AString> aArguments,
in AString aDescription, in nsIFile aIconFile, in AString aAppUserModelId,
in nsIFile aTarget);
void createShortcut(in nsIFile aBinary, in Array<AString> aArguments, in AString aDescription, in nsIFile aIconFile, in nsIFile aTarget);
};

View File

@@ -29,8 +29,6 @@
#include "windows.h"
#include "shellapi.h"
#include <propvarutil.h>
#include <propkey.h>
#ifdef _WIN32_WINNT
# undef _WIN32_WINNT
@@ -703,9 +701,7 @@ NS_IMETHODIMP
nsWindowsShellService::CreateShortcut(nsIFile* aBinary,
const nsTArray<nsString>& aArguments,
const nsAString& aDescription,
nsIFile* aIconFile,
const nsAString& aAppUserModelId,
nsIFile* aTarget) {
nsIFile* aIconFile, nsIFile* aTarget) {
NS_ENSURE_ARG(aBinary);
NS_ENSURE_ARG(aTarget);
@@ -734,25 +730,6 @@ nsWindowsShellService::CreateShortcut(nsIFile* aBinary,
link->SetIconLocation(icon.get(), 0);
}
if (!aAppUserModelId.IsEmpty()) {
RefPtr<IPropertyStore> propStore;
hr = link->QueryInterface(IID_IPropertyStore, getter_AddRefs(propStore));
NS_ENSURE_HRESULT(hr, NS_ERROR_FAILURE);
PROPVARIANT pv;
if (FAILED(InitPropVariantFromString(
PromiseFlatString(aAppUserModelId).get(), &pv))) {
return NS_ERROR_FAILURE;
}
hr = propStore->SetValue(PKEY_AppUserModel_ID, pv);
PropVariantClear(&pv);
NS_ENSURE_HRESULT(hr, NS_ERROR_FAILURE);
hr = propStore->Commit();
NS_ENSURE_HRESULT(hr, NS_ERROR_FAILURE);
}
RefPtr<IPersistFile> persist;
hr = link->QueryInterface(IID_IPersistFile, getter_AddRefs(persist));
NS_ENSURE_HRESULT(hr, NS_ERROR_FAILURE);