rem: feed.download(false, false); debug("after download, feed name = " + feed.name + "\n");  var server = getIncomingServer(); var folder; try { var folder = server.rootMsgFolder.getChildNamed(feed.name); } catch(e) {   debug("folder for new feed " + feed.name + " doesn't exist; creating"); debug("creating " + feed.name + "as child of " + server.rootMsgFolder + "\n"); server.rootMsgFolder.createSubfolder(feed.name, getMessageWindow()); folder = server.rootMsgFolder.FindSubFolder(feed.name); var msgdb = folder.getMsgDatabase(null); var folderInfo = msgdb.dBFolderInfo; folderInfo.setCharPtrProperty("feedUrl", feedProperties.feedLocation); }   dump ("feed name = " + feed.name + "\n"); addFeed(feedProperties.feedLocation, feed.name, null, folder);   feed.download(); 
add: feed.download(false, finishedDownloadingFeed); 
context: function doAdd() {    var userAddedFeed = false;     var feedProperties = { feedName: "", feedLocation: "", result: userAddedFeed};    feedProperties = openFeedEditor(feedProperties);    // if the user hit cancel, exit without doing anything    if (!feedProperties.result)    {      debug("feedProperties.result empty\n");      return;    }        if (!feedProperties.feedLocation)    {        debug("feedProperties.feedLocation empty\n");        return;    }    var itemResource = rdf.GetResource(feedProperties.feedLocation);    feed = new Feed(itemResource);    feed.download(false, false);    debug("after download, feed name = " + feed.name + "\n");    var server = getIncomingServer();    var folder;    try {        var folder = server.rootMsgFolder.getChildNamed(feed.name);    }    catch(e) {        // If we're here, it's probably because the folder doesn't exist yet,        // so create it.        debug("folder for new feed " + feed.name + " doesn't exist; creating");				debug("creating " + feed.name + "as child of " + server.rootMsgFolder + "\n");        server.rootMsgFolder.createSubfolder(feed.name, getMessageWindow());        folder = server.rootMsgFolder.FindSubFolder(feed.name);        var msgdb = folder.getMsgDatabase(null);        var folderInfo = msgdb.dBFolderInfo;        folderInfo.setCharPtrProperty("feedUrl", feedProperties.feedLocation);    }    // XXX This should be something like "subscribe to feed".		dump ("feed name = " + feed.name + "\n");    addFeed(feedProperties.feedLocation, feed.name, null, folder); // add feed flushes the subscription database    // now download it for real, now that we have a folder.    feed.download();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b9188f69f798bac2b3650c347540451646fecc35/subscriptions.js/clean/mail/extensions/newsblog/content/subscriptions.js