rem: var ireq = aWindowTarget.QueryInterface(Components.interfaces.nsIInterfaceRequestor); var win = ireq.getInterface(Components.interfaces.nsIDOMWindowInternal); 
add: var win = aWindowTarget.getInterface(Components.interfaces.nsIDOMWindowInternal); 
context:   handleContent: function (aContentType, aCommand, aWindowTarget, aRequest)  {    var ireq = aWindowTarget.QueryInterface(Components.interfaces.nsIInterfaceRequestor);    var win = ireq.getInterface(Components.interfaces.nsIDOMWindowInternal);        // It'd be nicer if the add bookmark dialog was parameterizable enough     // to be able to open here, instead of just showing a prompt, but that can    // be done later.     var spec = aRequest.QueryInterface(Components.interfaces.nsIChannel).URI.spec    var bookmark = nsBookmarkProtocolUtils.parseBookmarkURL(spec);    if (!bookmark)       return;    if (!this._bundle) {      var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);      this._bundle = sbs.createBundle("chrome://browser/locale/bookmarks/bookmarks.properties");    }        var title = this._bundle.GetStringFromName("addBookmarkPromptTitle");    var msg = this._bundle.formatStringFromName("addBookmarkPromptMessage", [bookmark.name, bookmark.url], 2);    var addBookmarkStr = this._bundle.GetStringFromName("addBookmarkPromptButton");    const nsIPromptService = Components.interfaces.nsIPromptService;    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(nsIPromptService);    var flags = (nsIPromptService.BUTTON_TITLE_IS_STRING * nsIPromptService.BUTTON_POS_0) + (nsIPromptService.BUTTON_TITLE_CANCEL * nsIPromptService.BUTTON_POS_1);    var rv = promptService.confirmEx(win, title, msg, flags, addBookmarkStr, null, null, null, {value: 0});    if (rv == 0) {      var bms = Components.classes["@mozilla.org/browser/bookmarks-service;1"].getService(Components.interfaces.nsIBookmarksService);      if (!bookmark.name)         bookmark.name = bookmark.url;            var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);      var root = rdf.GetResource("NC:BookmarksRoot");        // Append this bookmark to the end.      var bmRes = bms.createBookmarkInContainer(bookmark.name, bookmark.url, bookmark.keyword,                                                 bookmark.description, bookmark.charset, root, -1);      dump("*** bookmark =" + bookmark.toSource() + "\n");                                                      var ds = bms.QueryInterface(Components.interfaces.nsIRDFDataSource);      if (bookmark.webpanel == "true") {                                                           var webPanelArc = rdf.GetResource("http://home.netscape.com/NC-rdf#WebPanel");        var trueLiteral = rdf.GetLiteral("true");        ds.Assert(bmRes, webPanelArc, trueLiteral, true);        var tgt =  ds.GetTarget(bmRes, webPanelArc, true);        dump("*** tgt = "+ tgt.QueryInterface(Components.interfaces.nsIRDFLiteral).Value + "\n");      }                                                                     var rds = ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);                                    rds.Flush();    }  }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/f028ea412d0c11630bdcc8c88acbe3197c688376/nsBookmarkProtocolHandler.js/buggy/browser/components/bookmarks/src/nsBookmarkProtocolHandler.js