[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-52.3.0esr-7.5-2] squash! Bug 19273: Avoid JavaScript patching of the external app helper dialog.



commit 9ecbfca98dc5488527495e3bfde0fabf75a8529a
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
Date:   Wed Aug 30 16:58:52 2017 -0400

    squash! Bug 19273: Avoid JavaScript patching of the external app helper dialog.
    
    When handling an external URI or downloading a file, invoke Torbutton's
    external app blocker component (which will present a download warning
    dialog unless the user has checked the "Automatically download files
    from now on" box).
    
    For e10s compatibility, avoid using a modal dialog and instead use
    a callback interface (nsIHelperAppWarningLauncher) to allow Torbutton
    to indicate the user's desire to cancel or continue each request.
    
    Other bugs fixed:
     Bug 21766: Crash with e10s enabled while trying to download a file
     Bug 21886: Download is stalled in non-e10s mode
     Bug 22471: Downloading files via the PDF viewer download button is broken
     Bug 22472: Fix FTP downloads when external helper app dialog is shown
     Bug 22610: Avoid crashes when canceling external helper app downloads
     Bug 22618: Downloading pdf file via file:/// is stalling
---
 uriloader/exthandler/nsExternalHelperAppService.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
index df08905304fb..1c0dd8ee66f7 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -606,7 +606,7 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIHELPERAPPWARNINGLAUNCHER
 
-  nsExternalLoadURIHandler(nsIInterfaceRequestor * aWindowContext,
+  nsExternalLoadURIHandler(nsIInterfaceRequestor *aWindowContext,
                            nsIURI *aURI,
                            nsIHandlerInfo *aHandlerInfo);
 
@@ -669,7 +669,7 @@ NS_IMETHODIMP nsExternalLoadURIHandler::ContinueRequest()
   bool alwaysAsk = true;
   mHandlerInfo->GetAlwaysAskBeforeHandling(&alwaysAsk);
 
-  // if we are not supposed to ask, and the preferred action is to use
+  // If we are not supposed to ask, and the preferred action is to use
   // a helper app or the system default, we just launch the URI.
   if (!alwaysAsk && (preferredAction == nsIHandlerInfo::useHelperApp ||
                      preferredAction == nsIHandlerInfo::useSystemDefault))
@@ -1786,7 +1786,7 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest *request, nsISuppo
 NS_IMETHODIMP nsExternalAppHandler::ContinueRequest()
 {
   // Break our reference cycle with the download warning dialog (set up in
-  // OnStartRequest)
+  // OnStartRequest).
   mWarningDialog = nullptr;
 
   // now that the temp file is set up, find out if we need to invoke a dialog
@@ -1908,7 +1908,7 @@ NS_IMETHODIMP nsExternalAppHandler::ContinueRequest()
 NS_IMETHODIMP nsExternalAppHandler::CancelRequest(nsresult aReason)
 {
   // Break our reference cycle with the download warning dialog (set up in
-  // OnStartRequest)
+  // OnStartRequest).
   mWarningDialog = nullptr;
 
   return Cancel(aReason);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits