Skip to content

Commit

Permalink
Bug 1872543 - Fixed tab freeze due to getLaunchOnLoginShortcuts r=nal…
Browse files Browse the repository at this point in the history
…exander,mhughes

Differential Revision: https://phabricator.services.mozilla.com/D197590
  • Loading branch information
nipunshukla21 committed Jan 3, 2024
1 parent b3387dc commit e0bee69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 6 additions & 4 deletions browser/components/newtab/lib/OnboardingMessageProvider.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,10 @@ const BASE_MESSAGES = () => [
lifetime: 1,
},
trigger: { id: "defaultBrowserCheck" },
targeting: `source == 'newtab' && !launchOnLoginEnabled
targeting: `source == 'newtab'
&& 'browser.startup.windowsLaunchOnLogin.disableLaunchOnLoginPrompt'|preferenceValue == false
&& 'browser.startup.windowsLaunchOnLogin.enabled'|preferenceValue == true && isDefaultBrowser && !activeNotifications`,
&& 'browser.startup.windowsLaunchOnLogin.enabled'|preferenceValue == true && isDefaultBrowser && !activeNotifications
&& !launchOnLoginEnabled`,
},
{
id: "INFOBAR_LAUNCH_ON_LOGIN_FINAL",
Expand Down Expand Up @@ -1054,12 +1055,13 @@ const BASE_MESSAGES = () => [
lifetime: 1,
},
trigger: { id: "defaultBrowserCheck" },
targeting: `source == 'newtab' && !launchOnLoginEnabled
targeting: `source == 'newtab'
&& 'browser.startup.windowsLaunchOnLogin.disableLaunchOnLoginPrompt'|preferenceValue == false
&& 'browser.startup.windowsLaunchOnLogin.enabled'|preferenceValue == true && isDefaultBrowser && !activeNotifications
&& messageImpressions.INFOBAR_LAUNCH_ON_LOGIN[messageImpressions.INFOBAR_LAUNCH_ON_LOGIN | length - 1]
&& messageImpressions.INFOBAR_LAUNCH_ON_LOGIN[messageImpressions.INFOBAR_LAUNCH_ON_LOGIN | length - 1] <
currentDate|date - ${FOURTEEN_DAYS_IN_MS}`,
currentDate|date - ${FOURTEEN_DAYS_IN_MS}
&& !launchOnLoginEnabled`,
},
{
id: "FOX_DOODLE_SET_DEFAULT",
Expand Down
4 changes: 0 additions & 4 deletions browser/components/shell/nsWindowsShellService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,6 @@ nsWindowsShellService::GetLaunchOnLoginShortcuts(
if (NS_WARN_IF(FAILED(hr))) {
continue;
}
hr = link->Resolve(nullptr, SLR_NO_UI);
if (NS_WARN_IF(FAILED(hr))) {
continue;
}
hr = link->GetPath(target.get(), MAX_PATH, nullptr, 0);
if (NS_WARN_IF(FAILED(hr))) {
continue;
Expand Down

0 comments on commit e0bee69

Please sign in to comment.