Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351

This commit is contained in:
Alexandru Marc
2024-10-25 16:42:33 +03:00
parent 0251e36078
commit a5eb905bf4
370 changed files with 1286 additions and 1124 deletions

View File

@@ -1169,7 +1169,7 @@ static nsresult GetMatchingShortcut(int aCSIDL, const nsAString& aAUMID,
static_assert(MAXPATHLEN == MAX_PATH);
wchar_t storedExePath[MAX_PATH] = {};
// With no flags GetPath gets a long path
hr = link->GetPath(storedExePath, std::size(storedExePath), nullptr, 0);
hr = link->GetPath(storedExePath, ArrayLength(storedExePath), nullptr, 0);
if (FAILED(hr) || hr == S_FALSE) {
continue;
}
@@ -1394,7 +1394,7 @@ static bool IsCurrentAppPinnedToTaskbarSync(const nsAString& aumid) {
static_assert(MAXPATHLEN == MAX_PATH);
wchar_t storedExePath[MAX_PATH] = {};
// With no flags GetPath gets a long path
hr = link->GetPath(storedExePath, std::size(storedExePath), nullptr, 0);
hr = link->GetPath(storedExePath, ArrayLength(storedExePath), nullptr, 0);
if (FAILED(hr) || hr == S_FALSE) {
continue;
}
@@ -2579,7 +2579,7 @@ nsWindowsShellService::ClassifyShortcut(const nsAString& aPath,
{FOLDERID_UserPinned, u"\\TaskBar\\", u"Taskbar"},
{FOLDERID_UserPinned, u"\\StartMenu\\", u"StartMenu"}};
for (size_t i = 0; i < std::size(folders); ++i) {
for (size_t i = 0; i < ArrayLength(folders); ++i) {
nsAutoString knownPath;
// These flags are chosen to avoid I/O, see bug 1363398.