Skip to content

Commit 62007cd

Browse files
committed
Backed out changeset 530f475d6fdb (bug 1828249) for causing failures in test_DownloadLegacy.js
1 parent cd34e6e commit 62007cd

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

toolkit/components/downloads/DownloadIntegration.sys.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,10 @@ export var DownloadIntegration = {
519519
// the application to hang, or other performance issues.
520520
// The stream created in this way is forward-compatible with all the
521521
// current and future versions of Windows.
522-
const url = aDownload.source.originalUrl || aDownload.source.url;
523522
if (AppConstants.platform == "win" && this._shouldSaveZoneInformation()) {
524523
let zone;
525524
try {
526-
zone = lazy.gDownloadPlatform.mapUrlToZone(url);
525+
zone = lazy.gDownloadPlatform.mapUrlToZone(aDownload.source.url);
527526
} catch (e) {
528527
// Default to Internet Zone if mapUrlToZone failed for
529528
// whatever reason.
@@ -535,7 +534,7 @@ export var DownloadIntegration = {
535534
let path = aDownload.target.path + ":Zone.Identifier";
536535
try {
537536
let zoneId = "[ZoneTransfer]\r\nZoneId=" + zone + "\r\n";
538-
let { isPrivate, referrerInfo } = aDownload.source;
537+
let { url, isPrivate, referrerInfo } = aDownload.source;
539538
if (!isPrivate) {
540539
let referrer = referrerInfo
541540
? referrerInfo.computedReferrerSpec
@@ -601,7 +600,7 @@ export var DownloadIntegration = {
601600
}
602601

603602
await lazy.gDownloadPlatform.downloadDone(
604-
lazy.NetUtil.newURI(url),
603+
lazy.NetUtil.newURI(aDownload.source.url),
605604
aReferrer,
606605
new lazy.FileUtils.File(aDownload.target.path),
607606
aDownload.contentType,

toolkit/components/downloads/test/unit/common_test_Download.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,6 @@ add_task(async function test_windows_zoneInformation() {
391391
},
392392
expectedZoneId: "[ZoneTransfer]\r\nZoneId=3\r\n",
393393
},
394-
{
395-
options: {
396-
originalUrl: "https://original.url.com",
397-
},
398-
expectedZoneId:
399-
"[ZoneTransfer]\r\nZoneId=3\r\nHostUrl=https://original.url.com/\r\n",
400-
},
401394
];
402395
for (const test of tests) {
403396
const sourceUrl = test.sourceUrl || httpSourceUrl;

0 commit comments

Comments
 (0)