Browse Source

update toolkit/mozapps/downloads/nsHelperAppDlg.js diff

master
Roy Tam 5 years ago
parent
commit
86ca7913aa
  1. 15
      goanna-xulrunner-km-adapt.diff

15
goanna-xulrunner-km-adapt.diff

@ -954,7 +954,7 @@ index b2a47cf32..082e80ea5 100644
// This function exists to implement window.external.IsSearchProviderInstalled(),
diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
index 730515e53..53ed509eb 100644
index 730515e53..fc63ac002 100644
--- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
+++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
@@ -974,6 +974,8 @@ nsUnknownContentTypeDialog.prototype = {
@ -966,7 +966,7 @@ index 730515e53..53ed509eb 100644
// Close up dialog by returning true.
return true;
},
@@ -992,9 +994,20 @@ nsUnknownContentTypeDialog.prototype = {
@@ -992,9 +994,25 @@ nsUnknownContentTypeDialog.prototype = {
// Unhook dialog from this object.
this.mDialog.dialog = null;
@ -979,9 +979,14 @@ index 730515e53..53ed509eb 100644
+ cleanUp: function() {
+ // If the window that launched the download is "about:blank"
+ // then we need to close it.
+ let parent = this.mContext.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
+ if (parent && parent.document.location == 'about:blank') {
+ parent.close();
+ try {
+ var ir = this.mContext.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
+ var dwi = ir.getInterface(Components.interfaces.nsIDOMWindow);
+ if (dwi && dwi.document.location == 'about:blank') {
+ dwi.close();
+ }
+ } catch (ex) {
+ return;
+ }
+ },

Loading…
Cancel
Save