Changeset 857

Show
Ignore:
Timestamp:
2008-03-06 21:40:25 (10 months ago)
Author:
MaierMan
Message:

#523: Download for http password protected site over https fails.
minefield compat

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/chrome/content/dta/manager.js

    r855 r857  
    18151815} 
    18161816 
     1817var Prompts = { 
     1818        _authPrompter: null, 
     1819        _prompter: null, 
     1820        get authPrompter() { 
     1821                if (!this._authPrompter) { 
     1822                        this._authPrompter = WindowWatcherService.getNewAuthPrompter(window) 
     1823                                .QueryInterface(Ci.nsIAuthPrompt);               
     1824                } 
     1825                return this._authPrompter; 
     1826        }, 
     1827        get prompter() { 
     1828                if (!this._prompter) { 
     1829                        this._prompter = WindowWatcherService.getNewPrompter(window) 
     1830                                .QueryInterface(Ci.nsIPrompt); 
     1831                } 
     1832                return this._prompter; 
     1833        } 
     1834}; 
     1835 
    18171836function Connection(d, c, getInfo) { 
    18181837 
     
    18521871        this._chan.asyncOpen(this, null); 
    18531872} 
     1873 
    18541874Connection.prototype = { 
    18551875        _interfaces: [ 
     
    19011921        // nsIInterfaceRequestor 
    19021922        getInterface: function DL_getInterface(iid) { 
    1903                 if (this._interfaces.some(function(i) { return iid.equals(i); })) { 
    1904                         return this; 
    1905                 } 
    19061923                if (iid.equals(Ci.nsIAuthPrompt)) { 
    1907                         return this.authPrompter; 
    1908                 }       
     1924                        return Prompts.authPrompter; 
     1925                } 
    19091926                if (iid.equals(Ci.nsIPrompt)) { 
    1910                         return this.prompter; 
     1927                        return Prompts.prompter; 
     1928                } 
     1929                // for 1.9 
     1930                if ('nsIAuthPromptProvider' in Ci && iid.equals(Ci.nsIAuthPromptProvider)) { 
     1931                        return Prompts.prompter.QueryInterface(Ci.nsIAuthPromptProvider); 
     1932                } 
     1933                // for 1.9 
     1934                if ('nsIAuthPrompt2' in Ci && iid.equals(Ci.nsIAuthPrompt2)) { 
     1935                        return Prompts.authPrompter.QueryInterface(Ci.nsIAuthPrompt2); 
    19111936                } 
    19121937                try { 
     
    19181943                } 
    19191944        }, 
    1920         get authPrompter() { 
    1921                 try { 
    1922                         return WindowWatcherService.getNewAuthPrompter(window) 
    1923                                 .QueryInterface(Ci.nsIAuthPrompt); 
    1924                 } 
    1925                 catch (ex) { 
    1926                         Debug.log("authPrompter", ex); 
    1927                         throw ex; 
    1928                 } 
    1929         }, 
    1930         get prompter() { 
    1931                 try { 
    1932                         return WindowWatcherService.getNewPrompter(window) 
    1933                                 .QueryInterface(Ci.nsIPrompt); 
    1934                 } 
    1935                 catch (ex) { 
    1936                         Debug.log("prompter", ex); 
    1937                         throw ex; 
    1938                 } 
    1939         },       
     1945 
    19401946        // nsIChannelEventSink 
    19411947        onChannelRedirect: function DL_onChannelRedirect(oldChannel, newChannel, flags) {