One-click set-to-default fails in Firefox Background Tasks
Categories
(Toolkit :: Background Tasks, defect, P3)
Tracking
()
People
(Reporter: nrishel, Assigned: nrishel)
References
Details
(Whiteboard: [fidedi])
Attachments
(4 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr128+
|
Details | Review |
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
This succeeds in normal Firefox due to QueryInterface(Ci.nsIWindowsShellService) having likely been called on the nsIShellService prior to this call, which populates the root nsIShellService JavaScript object with the queried interface methods. In Firefox Background Tasks the relevant QueryInterface is unlikely to be called ahead of time, resulting in an exception.
Comment 2•1 year ago
|
||
NI @nrishel to help confirm if fix in this bug for enabling one-click from background tasks similar to Bug 1916780 is an uplift candidate and should be tracking Fx131 Thanks!
Updated•1 year ago
|
| Assignee | ||
Comment 3•1 year ago
|
||
A quick of the JavaScript implementation of XPCOM's QueryInterface is that it loads the interface's functions onto the queried object. For Services like ShellService this creates situations where the interface can be initialized at a distance, causing races depending on how Firefox is run - e.g. Desktop vs Background Task. To ensure consistent behavior this patch forces ShellService initialization of the native interface so that the native functions are always present.
To accomplish this, nsIWindowsShellService has been modified to inherit from nsIShellService to match other platforms and ensure that querying it also loads the nsIShellService members into shellService.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
:pdahiya We should uplift D221540 but let the other revision ride the trains.
Comment 6•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/fd04686c640c
https://hg.mozilla.org/mozilla-central/rev/71abe6c15cc4
| Assignee | ||
Comment 7•1 year ago
|
||
[Tracking Requested - why for this release]:
Uplift candidate to enable 1-click default in Fx131 in Background Tasks (Default Browser Agent). NI QA to help verify fix in Nightly Fx132.
To verify fix:
Change the default browser.
Run firefox.exe --backgroundtask defaultagent do-task asdf --force.
Click "yes" on the notification.
Verify the default browser has changed to Firefox, and that the Windows Settings app has not opened.
Comment 8•1 year ago
•
|
||
:nrishel please nominate D221540 for uplift (will uplift once verified in 132 first)
Comment 9•1 year ago
|
||
Verified that using latest Nightly 132.0a1 builds (.exe, .msi, .aarch-exe) on Windows 11, Windows 11 ARM and Windows 10 the 1-click works now with the Firefox Background Tasks without issues and also verified that the other ways to make it default still work as expected.
| Assignee | ||
Comment 10•1 year ago
|
||
This succeeds in normal Firefox due to QueryInterface(Ci.nsIWindowsShellService) having likely been called on the nsIShellService prior to this call, which populates the root nsIShellService JavaScript object with the queried interface methods. In Firefox Background Tasks the relevant QueryInterface is unlikely to be called ahead of time, resulting in an exception.
Original Revision: https://phabricator.services.mozilla.com/D221540
Updated•1 year ago
|
| Assignee | ||
Comment 11•1 year ago
|
||
This succeeds in normal Firefox due to QueryInterface(Ci.nsIWindowsShellService) having likely been called on the nsIShellService prior to this call, which populates the root nsIShellService JavaScript object with the queried interface methods. In Firefox Background Tasks the relevant QueryInterface is unlikely to be called ahead of time, resulting in an exception.
Original Revision: https://phabricator.services.mozilla.com/D221540
Updated•1 year ago
|
Comment 12•1 year ago
|
||
beta Uplift Approval Request
- User impact if declined: Increased chance of users leaving for another browser.
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: Change the default browser to non-Firefox, run
firefox.exe --backgroundtask defaultagent do-task asdf --force, click yes, observe that the default browser changes without further user intervention. - Risk associated with taking this patch: Minimal
- Explanation of risk level: Trivial oversight, code related to QI is well understood.
- String changes made/needed: None
- Is Android affected?: no
Comment 13•1 year ago
|
||
esr128 Uplift Approval Request
- User impact if declined: Increased chance of users leaving for another browser.
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: Change the default browser to non-Firefox, run
firefox.exe --backgroundtask defaultagent do-task asdf --force, click yes, observe that the default browser changes without further user intervention. - Risk associated with taking this patch: Minimal
- Explanation of risk level: Trivial oversight, code related to QI is well understood.
- String changes made/needed: None
- Is Android affected?: no
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 14•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 15•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Comment 16•1 year ago
|
||
(In reply to Bogdan Maris, Desktop Test Engineering from comment #9)
Verified that using latest Nightly 132.0a1 builds (.exe, .msi, .aarch-exe) on Windows 11, Windows 11 ARM and Windows 10 the 1-click works now with the Firefox Background Tasks without issues and also verified that the other ways to make it default still work as expected.
Also verified as fixed using Firefox 131.0b8 using the same installers on the same platforms.
Comment 17•1 year ago
|
||
(In reply to Bogdan Maris, Desktop Test Engineering from comment #16)
(In reply to Bogdan Maris, Desktop Test Engineering from comment #9)
Verified that using latest Nightly 132.0a1 builds (.exe, .msi, .aarch-exe) on Windows 11, Windows 11 ARM and Windows 10 the 1-click works now with the Firefox Background Tasks without issues and also verified that the other ways to make it default still work as expected.
Also verified as fixed using Firefox 131.0b8 using the same installers on the same platforms.
Same thing using Firefox 128.3.0esr.
Description
•