Removes frontWindow usage from the stream converter.
This commit is contained in:
parent
da8e345d14
commit
2b246192e1
@ -319,11 +319,9 @@ ChromeActions.prototype = {
|
||||
var extHelperAppSvc =
|
||||
Cc['@mozilla.org/uriloader/external-helper-app-service;1'].
|
||||
getService(Ci.nsIExternalHelperAppService);
|
||||
var frontWindow = Cc['@mozilla.org/embedcomp/window-watcher;1'].
|
||||
getService(Ci.nsIWindowWatcher).activeWindow;
|
||||
|
||||
var docIsPrivate = this.isInPrivateBrowsing();
|
||||
var netChannel = createNewChannel(blobUri, frontWindow.document, null);
|
||||
var netChannel = createNewChannel(blobUri, this.domWindow.document, null);
|
||||
if ('nsIPrivateBrowsingChannel' in Ci &&
|
||||
netChannel instanceof Ci.nsIPrivateBrowsingChannel) {
|
||||
netChannel.setPrivate(docIsPrivate);
|
||||
@ -359,10 +357,14 @@ ChromeActions.prototype = {
|
||||
var listener = {
|
||||
extListener: null,
|
||||
onStartRequest: function(aRequest, aContext) {
|
||||
var loadContext = self.domWindow
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsILoadContext);
|
||||
this.extListener = extHelperAppSvc.doContent(
|
||||
(data.isAttachment ? 'application/octet-stream' :
|
||||
'application/pdf'),
|
||||
aRequest, frontWindow, false);
|
||||
aRequest, loadContext, false);
|
||||
this.extListener.onStartRequest(aRequest, aContext);
|
||||
},
|
||||
onStopRequest: function(aRequest, aContext, aStatusCode) {
|
||||
|
Loading…
Reference in New Issue
Block a user