rem: var feedURI = Components.classes["@mozilla.org/network/io-service;1"]. getService(Components.interfaces.nsIIOService). newURI(targetDoc.location.href, null, null); var shellInfo = this._getContentShell(targetDoc, feedURI); 
add: var shellInfo = this._getContentShell(targetDoc); 
context:   onLinkAdded: function(event) {    // XXX this event listener can/should probably be combined with the onLinkAdded    // listener in tabbrowser.xml, which only listens for favicons and then passes    // them to onLinkIconAvailable in the ProgressListener.  We could extend the    // progress listener to have a generic onLinkAvailable and have tabbrowser pass    // along all events.  It should give us the browser for the tab, as well as    // the actual event.    if (!this._feedButton)      this._feedButton = document.getElementById("feed-button");    var erel = event.target.rel;    var etype = event.target.type;    var etitle = event.target.title;    // this is a blogger post service URL; so skip it    if (erel && erel == "service.post")      return;    if (etype == "application/rss+xml" ||        etype == "application/atom+xml" ||        etype == "application/x.atom+xml" ||        (etitle &&         (etitle.indexOf("RSS") != -1 ||          etitle.indexOf("Atom") != -1 ||          etitle.indexOf("rss") != -1)))    {      const targetDoc = event.target.ownerDocument;      // find which tab this is for, and set the attribute on the browser      // should there be a getTabForDocument method on tabbedbrowser?      var feedURI =           Components.classes["@mozilla.org/network/io-service;1"].          getService(Components.interfaces.nsIIOService).          newURI(targetDoc.location.href, null, null);      var shellInfo = this._getContentShell(targetDoc, feedURI);      var browserForLink = shellInfo.browser;      if (!browserForLink) {        // ??? this really shouldn't happen..        return;      }      var feeds = [];      if (browserForLink.feeds != null)        feeds = browserForLink.feeds;      var wrapper = event.target;      feeds.push({ href: wrapper.href,                   type: wrapper.type,                   title: wrapper.title});      browserForLink.feeds = feeds;      if (browserForLink == gBrowser || browserForLink == gBrowser.mCurrentBrowser)        this._feedButton.setAttribute("feeds", "true");    }  },
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/4dfffcd21d0ff9c7b303501e731e5e9b8d817465/browser.js/buggy/browser/base/content/browser.js