rem: if (XREMOTESERVICE_CONTRACTID in Components.classes) { var remoteService; remoteService = Components.classes[XREMOTESERVICE_CONTRACTID] .getService(Components.interfaces.nsIXRemoteService); remoteService.removeBrowserInstance(window);  
add: if (REMOTESERVICE_CONTRACTID in Components.classes) { 
context: function Shutdown(){  // remove remote support  if (XREMOTESERVICE_CONTRACTID in Components.classes) {    var remoteService;    remoteService = Components.classes[XREMOTESERVICE_CONTRACTID]                              .getService(Components.interfaces.nsIXRemoteService);    remoteService.removeBrowserInstance(window);    var observerService = Components.classes["@mozilla.org/observer-service;1"]      .getService(Components.interfaces.nsIObserverService);    observerService.removeObserver(gTabOpenObserver, "open-new-tab-request", false);  }  // shut down browser access support  window.browserDOMWindow = null;  try {    getBrowser().removeProgressListener(window.XULBrowserWindow);  } catch (ex) {  }  var bt = document.getElementById("bookmarks-ptf");  if (bt) {    bt.database.RemoveObserver(BookmarksToolbarRDFObserver);  }  controllers.removeController(BookmarksMenuController);  window.XULBrowserWindow.destroy();  window.XULBrowserWindow = null;  window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)        .getInterface(Components.interfaces.nsIWebNavigation)        .QueryInterface(Components.interfaces.nsIDocShellTreeItem).treeOwner        .QueryInterface(Components.interfaces.nsIInterfaceRequestor)        .getInterface(Components.interfaces.nsIXULWindow)        .XULBrowserWindow = null;  BrowserFlushBookmarksAndHistory();  // unregister us as a pref listener  removePrefListener(gButtonPrefListener);  removePrefListener(gTabStripPrefListener);  removePrefListener(gHomepagePrefListener);  removePopupPermListener(gPopupPermListener);  removePrefListener(gPopupPrefListener);  window.browserContentListener.close();  // Close the app core.  if (appCore)    appCore.close();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/7f42daa56d5e0b58884f6412ea2c283f60db5a68/navigator.js/clean/xpfe/browser/resources/content/navigator.js