Commit 73625495 authored by brizental's avatar brizental
Browse files

fixup! Bug 41854: Allow overriding download spam protection.

parent 7636e980
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -257,7 +257,10 @@ export class DownloadSpamProtection {
    let wsp =
      this._forWindowMap.get(window) ?? new WindowSpamProtection(window);
    this._forWindowMap.set(window, wsp);
    wsp.addDownloadSpam(url, new DownloadSpamEnabler(loadInfo.triggeringPrincipal, this));
    wsp.addDownloadSpam(
      url,
      new DownloadSpamEnabler(loadInfo.triggeringPrincipal, this)
    );
  }

  /**
+1 −4
Original line number Diff line number Diff line
@@ -1156,10 +1156,7 @@ var DownloadObserver = {
      case "blocked-automatic-download":
        if (AppConstants.MOZ_BUILD_APP == "browser") {
          DownloadIntegration._initializeDownloadSpamProtection();
          DownloadIntegration.downloadSpamProtection.update(
            aData,
            aSubject
          );
          DownloadIntegration.downloadSpamProtection.update(aData, aSubject);
        }
        break;
    }