rem: var templateName; 
context: function cmdSaveProfile (e){    function onComplete (i)    {        var msg = getMsg(MSN_PROFILE_SAVED, getURLSpecFromFile(file.localFile));        display (msg);        console.status = msg;        file.close();    };            var templatePfx = "profile.template.";    var i;    var ext;        if (!e.targetFile || e.targetFile == "?")    {        var list = console.prefManager.listPrefs(templatePfx);        var extList = "";        for (i = 0; i < list.length; ++i)        {            ext = list[i].substr(templatePfx.length);            if (list[i].search(/html|htm|xml|txt/i) == -1)                extList += "*." + ext + " ";        }        var rv = pickSaveAs(MSG_SAVE_PROFILE, "$html $xml $text " +                             extList + "$all");        if (rv.reason == PICK_CANCEL)            return null;        e.targetFile = rv.file;    }        var file = fopen (e.targetFile, ">");    var templateName;    var ary = file.localFile.path.match(/\.([^.]+)$/);    if (ary)        ext = ary[1].toLowerCase();    else        ext = "txt";    templateName = templatePfx + ext;    var templateFile;    if (templateName in console.prefs)        templateFile = console.prefs[templateName];    else        templateFile = console.prefs[templatePfx + "txt"];        var reportTemplate = console.profiler.loadTemplate(templateFile);    var scriptInstanceList = new Array();        var j;    if (!("urlList" in e) || e.urlList.length == 0)    {        if ("url" in e && e.url)            e.urlList = [e.url];        else            e.urlList = keys(console.scriptManagers);    }        e.urlList = e.urlList.sort();        for (i = 0; i < e.urlList.length; ++i)    {        var url = e.urlList[i];        if (!ASSERT (url in console.scriptManagers, "url not loaded"))            continue;        var manager = console.scriptManagers[url];        for (j in manager.instances)            scriptInstanceList.push (manager.instances[j]);    }    var rangeList;    if (("profile.ranges." + ext) in console.prefs)        rangeList = console.prefs["profile.ranges." + ext].split(",");    else        rangeList = console.prefs["profile.ranges.default"].split(",");        var profileReport = new ProfileReport (reportTemplate, file, rangeList,                                           scriptInstanceList);    profileReport.onComplete = onComplete;        console.profiler.generateReport (profileReport);    return file.localFile;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/1dfad411915032dbfbba1259cc94b8fa032eac7a/venkman-commands.js/clean/extensions/venkman/resources/content/venkman-commands.js