bug799185-2.js (1128B)
1 function test(aLauncher) { 2 var result = null; 3 4 let prefs = 0; 5 let bundle = 1; 6 7 if (!bundle) { 8 // Check to see if the user wishes to auto save to the default download 9 // folder without prompting. Note that preference might not be set. 10 let autodownload = false; 11 try { 12 autodownload = !!autodownload; 13 } catch (e) { } 14 15 if (autodownload) { 16 // Retrieve the user's default download directory 17 let dnldMgr = 2; 18 let defaultFolder = 3; 19 20 try { 21 result = 42; 22 } 23 catch (ex) { 24 if (result == 12) { 25 let prompter = 4; 26 return; 27 } 28 } 29 30 // Check to make sure we have a valid directory, otherwise, prompt 31 if (result) 32 return result; 33 } 34 } 35 36 // Use file picker to show dialog. 37 var picker = 0; 38 if (picker) { 39 // aSuggestedFileExtension includes the period, so strip it 40 picker = 1; 41 } 42 else { 43 try { 44 picker = aLauncher.MIMEInfo.primaryExtension; 45 } 46 catch (ex) { } 47 } 48 return result; 49 } 50 51 test({});