Closed Bug 1639606 Opened 4 years ago Closed 4 years ago

Opening PDF in system default always opens in new tab

Categories

(Firefox :: File Handling, defect)

defect

Tracking

()

VERIFIED FIXED
Firefox 78
Tracking Status
firefox-esr68 --- unaffected
firefox76 --- unaffected
firefox77 --- unaffected
firefox78 --- verified

People

(Reporter: mstriemer, Assigned: jaws)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

When trying to open a PDF with the system default app, it is instead opening in Nightly. This appears to be because we now try to prefer opening PDFs in Nightly from the Downloads Panel (bug 1191591) but that code is also running when the file is being downloaded, not just from the panel.

STR

  1. Go to https://www.irs.gov/pub/irs-pdf/f1040.pdf.
  2. Click "Open With a Different Viewer".
  3. Select Open with and the default option.

Expected results: The PDF is opened in your system PDF viewer.
Actual results: The PDF opens again in a new tab in Nightly.

This should only be happening from within PDF.js

Assignee: nobody → jaws
Status: NEW → ASSIGNED
See Also: → 1639715

Set release status flags based on info from the regressing bug 1191591

Attachment #9150617 - Attachment description: Bug 1639606 - Don't redirect the opening of the download if it was initiated from an internal resource. → Bug 1639606 - Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been amade to launch externally.
Attachment #9150617 - Attachment description: Bug 1639606 - Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been amade to launch externally. → Bug 1639606 - Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been made to launch externally.
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ee9c7714e513 Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been made to launch externally. r=Gijs

Backed out changeset ee9c7714e513 (bug 1639606) for browser_download_open_with_internal_handler.js failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedTaskRun=fcJ7Dn-MTuKp-_pSzclm5A-0&searchStr=linux%2C18.04%2Cx64%2Cdebug%2Cmochitests%2Ctest-linux1804-64%2Fdebug-mochitest-browser-chrome-e10s-12%2Cm%28bc12%29&fromchange=ee9c7714e513f09f8f829c626d7301662ba475e0&tochange=99a82cb34de1fb50533829a271506d94da191744

Backout link: https://hg.mozilla.org/integration/autoland/rev/99a82cb34de1fb50533829a271506d94da191744

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=303331109&repo=autoland&lineNumber=23932

...
[task 2020-05-22T03:47:39.640Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 5 (0x7faf0b0ebde0) [pid = 7734] [serial = 3] [outer = (nil)] [url = chrome://extensions/content/dummy.xhtml]
[task 2020-05-22T03:47:39.640Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 4 (0x7faf0ad40000) [pid = 7734] [serial = 4] [outer = (nil)] [url = chrome://extensions/content/dummy.xhtml]
[task 2020-05-22T03:47:39.642Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (0x7faedd71d400) [pid = 7734] [serial = 53] [outer = (nil)] [url = about:blank]
[task 2020-05-22T03:47:39.642Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (0x7faf0b0ebfb0) [pid = 7734] [serial = 5] [outer = (nil)] [url = about:blank]
[task 2020-05-22T03:47:39.643Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 1 (0x7faf086bbd40) [pid = 7734] [serial = 7] [outer = (nil)] [url = resource://gre-resources/hiddenWindow.html]
[task 2020-05-22T03:47:39.650Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 0 (0x7faf0e4ac400) [pid = 7734] [serial = 9] [outer = (nil)] [url = resource://gre-resources/hiddenWindow.html]
[task 2020-05-22T03:47:39.658Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/netwerk/base/nsNetUtil.cpp, line 2295
[task 2020-05-22T03:47:39.659Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734, Main Thread] WARNING: 'NS_FAILED(rv)', file /builds/worker/checkouts/gecko/caps/ContentPrincipal.cpp, line 398
[task 2020-05-22T03:47:39.659Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/caps/ContentPrincipal.cpp, line 423
[task 2020-05-22T03:47:39.695Z] 03:47:39     INFO - GECKO(7734) | [Parent 7734, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp, line 3359
[task 2020-05-22T03:47:39.798Z] 03:47:39     INFO - TEST-INFO | Main app process: exit 0
[task 2020-05-22T03:47:39.798Z] 03:47:39     INFO - TEST-INFO | Confirming we saw 76 DOCSHELL created and 76 destroyed log strings.
[task 2020-05-22T03:47:39.798Z] 03:47:39     INFO - TEST-INFO | Confirming we saw 192 DOMWINDOW created and 192 destroyed log strings.
[task 2020-05-22T03:47:39.798Z] 03:47:39    ERROR - TEST-UNEXPECTED-FAIL | uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js | leaked 5 window(s) until shutdown [url = about:blank]
[task 2020-05-22T03:47:39.798Z] 03:47:39    ERROR - TEST-UNEXPECTED-FAIL | uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js | leaked 5 window(s) until shutdown [url = chrome://mozapps/content/downloads/unknownContentType.xhtml]
[task 2020-05-22T03:47:39.798Z] 03:47:39     INFO - TEST-INFO | uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js | windows(s) leaked: [pid = 7734] [serial = 27], [pid = 7734] [serial = 23], [pid = 7734] [serial = 26], [pid = 7734] [serial = 30], [pid = 7734] [serial = 22], [pid = 7734] [serial = 29], [pid = 7734] [serial = 31], [pid = 7734] [serial = 25], [pid = 7734] [serial = 28], [pid = 7734] [serial = 24]
[task 2020-05-22T03:47:39.798Z] 03:47:39     INFO - TEST-INFO | uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js | This test created 1 hidden window(s)
[task 2020-05-22T03:47:39.798Z] 03:47:39     INFO - TEST-INFO | uriloader/exthandler/tests/mochitest/browser_download_open_with_internal_handler.js | This test created 1 hidden docshell(s)
[task 2020-05-22T03:47:39.798Z] 03:47:39     INFO - TEST-INFO | uriloader/exthandler/tests/mochitest/browser_auto_close_window.js | This test created 1 hidden window(s)
...
Flags: needinfo?(jaws)
Flags: needinfo?(jaws)
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2708f3e553cb Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been made to launch externally. r=Gijs
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a2f741cef6a Downloads that are set to launchWhenSucceeded with an external application should not get handled internally, unless an attempt has already been made to launch externally. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78

Verified fixed with Fx 78.0a1 (2020-05-25) across platforms - Windows 10 64bit, macOS 10.15 and Ubuntu 18.04.

Status: RESOLVED → VERIFIED
Flags: needinfo?(jaws)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: