Commit graph

1247 commits

Author SHA1 Message Date
Gijs Kruitbosch
a30f9a5843 Bug 1824095 - rename savePrivacyAwareURI to saveURI, r=mtigley
Depends on D173432

Differential Revision: https://phabricator.services.mozilla.com/D173433
2023-03-24 11:54:45 +00:00
Marco Bonardo
5fe41c6817 Bug 1796745 - Canceled downloads are shown as failed. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D171926
2023-03-15 12:32:00 +00:00
Neil Deakin
1cc5883b43 Bug 1815062, move filename and extension validity checks into SanitizeFileName so that they get called after sanitization is complete, r=Gijs,necko-reviewers
For now, this leaves existing callers of DownloadPaths.sanitize as is using a flag.

Differential Revision: https://phabricator.services.mozilla.com/D169124
2023-02-28 18:57:24 +00:00
Marco Bonardo
a043e16894 Bug 1760112 - Wait for the expected annotation value in test_DownloadLegacy.js. r=Gijs
The downloads code is not awaiting for history storing data, thus a previous
sub-test may still be in the process of storing its annotations.

Differential Revision: https://phabricator.services.mozilla.com/D168959
2023-02-07 09:27:24 +00:00
Marco Bonardo
13d9ba1073 Bug 1760112 - Workaround frequent failure in test_DownloadLegacy.js. r=Gijs
The test is often seeing downloadTaget.size = 0, that means refresh() was either
not invoked or not properly awaited for. For now just add an artificial refresh
to avoid disabling the test.
A proper fix should be investigated in Bug 1814364

Differential Revision: https://phabricator.services.mozilla.com/D168533
2023-02-01 12:42:28 +00:00
Mark Banner
351482d35e Bug 1808400 - Handle cases of .then(foo, Cu.reportError) in ESLint rule no-cu-reportError. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D167520
2023-01-23 18:09:04 +00:00
Mark Banner
166d8573cb Bug 1811796 - Automatically replace Cu.reportError with console.error (most of toolkit). r=mossop,credential-management-reviewers,dimi
Depends on D167518

Differential Revision: https://phabricator.services.mozilla.com/D167519
2023-01-23 18:09:03 +00:00
Mark Banner
8730eec697 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Mark Banner
8ff997068a Bug 1806306 - Convert AsyncShutdown imports to direct ES imports. r=mak,webdriver-reviewers,application-update-reviewers,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D164981
2022-12-23 12:37:06 +00:00
Gijs Kruitbosch
3059ccfa73 Bug 1803800, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D163932
2022-12-12 17:44:14 +00:00
Nika Layzell
98304d1200 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-12-01 15:43:19 +00:00
Marian-Vasile Laza
7492025127 Backed out 7 changesets (bug 1793463) for causing bustages on nsIOService.cpp. CLOSED TREE
Backed out changeset 47c3acb30de2 (bug 1793463)
Backed out changeset 71afe900eb17 (bug 1793463)
Backed out changeset d168599a269e (bug 1793463)
Backed out changeset d0f18d300818 (bug 1793463)
Backed out changeset a116e6f089f2 (bug 1793463)
Backed out changeset eba1123c8b56 (bug 1793463)
Backed out changeset 68a3eb8a3057 (bug 1793463)
2022-12-01 02:30:02 +02:00
Nika Layzell
9cc8ee8c01 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-11-30 18:13:43 +00:00
Shane Hughes
53758c6b7d Bug 1802738 - Fix the error log when deleting canceled downloads. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D163174
2022-11-29 07:10:39 +00:00
Barret Rennie
2ece2f0ce3 Bug 1541508 - Use Services.env in toolkit/ r=Gijs,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D160149
2022-11-25 19:09:11 +00:00
Mark Banner
1c91ba2d0d Bug 1802153 - Don't try to add history metaData for downloads when history does not support the uri. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D163007
2022-11-25 08:34:57 +00:00
Mark Banner
05f486c76f Bug 1801809 - Automatically replace Cu.reportError with console.error (places, download). r=mak
Depends on D162696

Differential Revision: https://phabricator.services.mozilla.com/D162697
2022-11-22 16:23:38 +00:00
Barret Rennie
a487956c41 Bug 1772930 - Port osfile.jsm to IOUtils in toolkit/components/downloads/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D155945
2022-11-21 23:56:02 +00:00
Norisz Fay
3d01e04547 Backed out changeset 21b10bf50941 (bug 1772930) for causing xpcshell failures on test_DownloadCore.js CLOSED TREE 2022-11-19 07:18:34 +02:00
Barret Rennie
9b4aca70c6 Bug 1772930 - Port osfile.jsm to IOUtils in toolkit/components/downloads/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D155945
2022-11-19 04:37:58 +00:00
Mark Banner
82a9bfdbe8 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (toolkit/). r=mossop,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161910
2022-11-17 12:00:29 +00:00
Eemeli Aro
cfa546ca80 Bug 1791178 - Convert DownloadUIHelper.sys.mjs to Fluent. r=Gijs,fluent-reviewers,flod
The downloadsFolder string is left in the downloads.properties file, at least for now, as it's also used from C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D158468
2022-11-09 23:32:30 +00:00
Mark Banner
a24dca9645 Bug 1798212 - Replace defineModuleGetter in Integration.sys.mjs with a ES version. r=settings-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D161014
2022-11-07 17:56:10 +00:00
Mark Banner
18753bfe42 Bug 1798212 - Convert consumers of downloads code to ES modules. r=mak,geckoview-reviewers,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich,mconley,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D161013
2022-11-07 17:56:10 +00:00
Mark Banner
a9d47c7a8c Bug 1798212 - Convert downloads code to ES modules. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D161012
2022-11-07 17:56:09 +00:00
Sandor Molnar
ed278aea94 Backed out 2 changesets (bug 1772930, bug 1788997) for causing mochitest failures in dom/system/tests/ioutils/test_ioutils_read_write.html
Backed out changeset 289203a06952 (bug 1772930)
Backed out changeset b58a5a6cc939 (bug 1788997)
2022-11-02 20:37:09 +02:00
Barret Rennie
bbd550a864 Bug 1772930 - Port osfile.jsm to IOUtils in toolkit/components/downloads/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D155945
2022-11-02 15:25:07 +00:00
Cristian Tuns
4d37cf70f1 Backed out 19 changesets (bug 1541508) for causing xpcshell failures on test_notHeadlessByDefault.js CLOSED TREE
Backed out changeset 08476fa2bc27 (bug 1541508)
Backed out changeset 0bf7514845db (bug 1541508)
Backed out changeset aa612a5e9ef7 (bug 1541508)
Backed out changeset 6bb9360473f7 (bug 1541508)
Backed out changeset b3d8e92f50c2 (bug 1541508)
Backed out changeset fa40dded133e (bug 1541508)
Backed out changeset 2e7db4aa8d4f (bug 1541508)
Backed out changeset 6098e2eb62ea (bug 1541508)
Backed out changeset 2c599ee639c4 (bug 1541508)
Backed out changeset 7d44f6e2644c (bug 1541508)
Backed out changeset c1279c3d674c (bug 1541508)
Backed out changeset 8bd08a62a590 (bug 1541508)
Backed out changeset 740010cb005c (bug 1541508)
Backed out changeset 0bfc7dd85c62 (bug 1541508)
Backed out changeset c4374a351356 (bug 1541508)
Backed out changeset 44ccfeca7364 (bug 1541508)
Backed out changeset e944e706a523 (bug 1541508)
Backed out changeset 2c59d66f43e4 (bug 1541508)
Backed out changeset a1896eacb6f1 (bug 1541508)
2022-11-01 22:38:52 -04:00
Barret Rennie
c69d38ba19 Bug 1541508 - Use Services.env in toolkit/ r=Gijs,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D160149
2022-11-02 02:08:58 +00:00
Mark Banner
2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Shane Hughes
ad03151040 Bug 1742999 - Make DownloadSpamProtection per-window. r=Gijs,mak
This patch modifies DownloadSpamProtection and DownloadIntegration so
that each window will track blocked spam downloads separately. (Which
shouldn't affect permissions.) When a download is blocked, the helper
app service dispatches a notification, passing the relevant browsing
context and URL to DownloadIntegration. Then it passes the window and
URL to the singleton DownloadSpamProtection. That maps all the windows
to objects that carry the spam download objects. This allows us to only
show blocked spam downloads in the downloads panel of the window from
which they were triggered.

Differential Revision: https://phabricator.services.mozilla.com/D148092
2022-10-04 22:38:18 +00:00
Mark Banner
8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Mike Kaply
41d6c8e6ec Bug 1779018 - Use policy to determine if executable files can be launched. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D152195
2022-08-16 22:32:52 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Joel Maher
bf4b875752 Bug 1781782 - Run frequent xpcshell parallel failing tests sequential by default. r=ahal,necko-reviewers,extension-reviewers,application-update-reviewers,bytesized,rpl,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D153081
2022-07-30 01:33:28 +00:00
Mark Banner
f77e072cc5 Bug 1782192 - Fix ESLint no-unused-vars warnings in xpcshell-tests for toolkit. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D153164
2022-07-29 21:54:32 +00:00
Mark Banner
4bfafd41fa Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 22:34:21 +00:00
smolnar
102b779608 Backed out 8 changesets (bug 1779982, bug 1780017, bug 1780347) for causing doc generate failures. CLOSED TREE
Backed out changeset 3f22c0f99cf1 (bug 1780347)
Backed out changeset 6f20b7e4b21b (bug 1780017)
Backed out changeset ae6062c69aeb (bug 1780017)
Backed out changeset e668d7778d97 (bug 1780017)
Backed out changeset e158fc41594b (bug 1780017)
Backed out changeset d4c69c956271 (bug 1779982)
Backed out changeset 145212fd826d (bug 1779982)
Backed out changeset 54079aaa1857 (bug 1779982)
2022-07-20 22:43:53 +03:00
Mark Banner
23086da9b9 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 15:50:40 +00:00
Iulian Moraru
1108246986 Backed out 7 changesets (bug 1779982, bug 1780017) for causing multiple failures. CLOSED TREE
Backed out changeset f33a58aa2f3f (bug 1780017)
Backed out changeset e21c85d61b91 (bug 1780017)
Backed out changeset 213ee5578e7c (bug 1780017)
Backed out changeset ea9b3bf42ea1 (bug 1780017)
Backed out changeset d2d8530f3c4d (bug 1779982)
Backed out changeset 088e5148c307 (bug 1779982)
Backed out changeset 267e08f3868a (bug 1779982)
2022-07-20 15:44:53 +03:00
Mark Banner
e84aaa1b85 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 10:36:49 +00:00
ui.sayuree
7a8359af1a Bug 1777154 - remove reference to no more existing Fennec modules. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D151861
2022-07-20 09:30:31 +00:00
Shane Hughes
d5fb4566c2 Bug 1739348 - Don't open downloads panel after download dialogs. r=NeilDeakin
This is a medium sized patch to legacy download construction. It takes
advantage of the new property added in Bug 1762033 to prevent the
downloads panel from being automatically shown when a download is added
after an interaction with the unknown content type dialog or the file
picker dialog. I chose to not do the same for failed transfers since I
thought it might serve some use, but that might be wrong. I don't know
if there's a way to test the dialog that appears when you download an
executable without going through the same path I adjusted with the
patch. It seems like it's covered but I could be wrong. Also add a test
to cover these changes from the bottom up. Thanks and apologies for my
sloppy C++, though I'm sure I'll learn a lot more from the review 😅

Differential Revision: https://phabricator.services.mozilla.com/D145312
2022-07-18 20:45:41 +00:00
Tooru Fujisawa
54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa
f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Tooru Fujisawa
b75b7a5d26 Bug 1772969 - Part 4: Use plain lazy getter to add alias for DownloadIntegration. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D149710
2022-06-22 07:36:50 +00:00
Mark Banner
a305bf7d18 Bug 1771173 - Fix/ignore some duplicate imports caught by the new valid-lazy rule. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D149715
2022-06-21 20:42:14 +00:00