Bug 1373109 - Don't call MaybeCloseWindow twice when diverting. r=mconley draft
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 20 Jun 2017 17:37:24 -0700
changeset 599231 6e26ca7f000e7cd834e02ddb0146f17a5d7567d9
parent 599048 2403cb851fe3e56b9018eaa645c78e913d927812
child 599232 4f1465449c8354ff498181cb06c8eeae06f141dc
push id65454
push userbmo:mrbkap@mozilla.com
push dateThu, 22 Jun 2017 21:15:34 +0000
reviewersmconley
bugs1373109
milestone56.0a1
Bug 1373109 - Don't call MaybeCloseWindow twice when diverting. r=mconley nsExternalHelperAppService::OnStartRequest calls MaybeCloseWindow unconditionally after it finishes looking at the request headers. The call from DidDivertRequest is redundant (and possibly left over from when we didn't call OnStartRequest properly). MozReview-Commit-ID: Cm5YhCt5XLY
uriloader/exthandler/nsExternalHelperAppService.cpp
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -1282,17 +1282,16 @@ nsExternalAppHandler::~nsExternalAppHand
 }
 
 void
 nsExternalAppHandler::DidDivertRequest(nsIRequest *request)
 {
   MOZ_ASSERT(XRE_IsContentProcess(), "in child process");
   // Remove our request from the child loadGroup
   RetargetLoadNotifications(request);
-  MaybeCloseWindow();
 }
 
 NS_IMETHODIMP nsExternalAppHandler::SetWebProgressListener(nsIWebProgressListener2 * aWebProgressListener)
 {
   // This is always called by nsHelperDlg.js. Go ahead and register the
   // progress listener. At this point, we don't have mTransfer.
   mDialogProgressListener = aWebProgressListener;
   return NS_OK;