rem: bookmarkTitle = PlacesController.bookmarks.getItemTitle(uri); 
add:  var bmSvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getService(Ci.nsINavBookmarksService); bookmarkTitle = bmSvc.getItemTitle(uri); 
context:   readHomePage: function ()  {    var useCurrent = document.getElementById("useCurrent");    var chooseBookmark = document.getElementById("chooseBookmark");    var bookmarkName = document.getElementById("bookmarkName");    var otherURL = document.getElementById("otherURL");    // handle selection of "bookmark" radio when there's nothing there: in this    // case, the value in preferences is the most recent value stored in the    // preference (to be applied now or later as needed), and the uri attribute    // on bookmarkName == "(none)" -- if prefs are written with "bookmark"    // selected but with no set uri attribute or the attribute is equal to    // "(none)", then the previous value is stored to preferences    if (bookmarkName.getAttribute("uri") == "(none)") {      useCurrent.disabled = otherURL.disabled = true;      bookmarkName.disabled = chooseBookmark.disabled = false;      return "bookmark";    }    var homePage = document.getElementById("browser.startup.homepage");    if (homePage.value == homePage.defaultValue) {      useCurrent.disabled = otherURL.disabled = true;      bookmarkName.disabled = chooseBookmark.disabled = true;      return "default";    }    else {      var bookmarkTitle = null;      if (homePage.value.indexOf("|") >= 0) {        // multiple tabs -- XXX dangerous "|" character!        // don't bother treating this as a bookmark, because the level of        // discernment needed to determine that these actually represent a        // folder is probably more trouble than it's worth      } else {#ifdef MOZ_PLACES        // XXX this also retrieves titles of pages that are only in history and        //     not only in bookmarks, but there's nothing that can be done about        //     that without more fine-grained APIs        const Cc = Components.classes, Ci = Components.interfaces;        try {          var ios = Cc["@mozilla.org/network/io-service;1"]                      .getService(Ci.nsIIOService);          var uri = ios.newURI(homePage.value, "UTF-8", null);          bookmarkTitle = PlacesController.bookmarks.getItemTitle(uri);        } catch (e) {          bookmarkTitle = null;        }#else        // determining this without Places == great pain and suffering in the        // general case, so check if the bookmark field has a uri attribute        // and see if it's equal to the current home page -- this means that if        // you choose a bookmark and set it as home page on any instant-apply        // platform (i.e., not Windows), you can do that and switch back and        // forth between the three radio options and things will work correctly,        // but once the window's closed and reopened it'll just appear as a        // normal "other URL"        if (bookmarkName.getAttribute("uri") == homePage.value)          bookmarkTitle = bookmarkName.value;#endif      }      if (bookmarkTitle) {        useCurrent.disabled = otherURL.disabled = true;        bookmarkName.disabled = chooseBookmark.disabled = false;        bookmarkName.value = bookmarkTitle;        // in case this isn't the result of the user choosing a bookmark        bookmarkName.setAttribute("uri", homePage.value);        return "bookmark";      } else {        useCurrent.disabled = otherURL.disabled = false;        bookmarkName.disabled = chooseBookmark.disabled = true;        if (homePage.value == "about:blank") {          otherURL.value = document.getElementById("bundlePreferences")                                   .getString("blankpage");        } else {          otherURL.value = homePage.value;        }        return "other";      }    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/37afea749c7e501929a21e471c1c4e098670cc6c/main.js/buggy/browser/components/preferences/main.js