js/src/jit-test/tests/ion/bug799185-2.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 function test(aLauncher) {
     2     var result = null;
     4     let prefs = 0;
     5     let bundle = 1;
     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) { }
    15       if (autodownload) {
    16         // Retrieve the user's default download directory
    17         let dnldMgr = 2;
    18         let defaultFolder = 3;
    20         try {
    21           result = 42;
    22         }
    23         catch (ex) {
    24           if (result == 12) {
    25             let prompter = 4;
    26             return;
    27           }
    28         }
    30         // Check to make sure we have a valid directory, otherwise, prompt
    31         if (result)
    32           return result;
    33       }
    34     }
    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   }
    51 test({});

mercurial