Changeset 857
- Timestamp:
- 2008-03-06 21:40:25 (10 months ago)
- Files:
-
- trunk/chrome/content/dta/manager.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/dta/manager.js
r855 r857 1815 1815 } 1816 1816 1817 var 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 1817 1836 function Connection(d, c, getInfo) { 1818 1837 … … 1852 1871 this._chan.asyncOpen(this, null); 1853 1872 } 1873 1854 1874 Connection.prototype = { 1855 1875 _interfaces: [ … … 1901 1921 // nsIInterfaceRequestor 1902 1922 getInterface: function DL_getInterface(iid) { 1903 if (this._interfaces.some(function(i) { return iid.equals(i); })) {1904 return this;1905 }1906 1923 if (iid.equals(Ci.nsIAuthPrompt)) { 1907 return this.authPrompter;1908 } 1924 return Prompts.authPrompter; 1925 } 1909 1926 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); 1911 1936 } 1912 1937 try { … … 1918 1943 } 1919 1944 }, 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 1940 1946 // nsIChannelEventSink 1941 1947 onChannelRedirect: function DL_onChannelRedirect(oldChannel, newChannel, flags) {
