add: var uri = Components.classes["@mozilla.org/network/standard-url;1"]. createInstance(Components.interfaces.nsIURI); uri.spec = url; if (uri.schemeIs("javascript") || uri.schemeIs("data")) { var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService); var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); var historyBundle = strBundleService.createBundle("chrome: var brandBundle = strBundleService.createBundle("chrome: var brandStr = brandBundle.GetStringFromName("brandShortName"); var errorStr = historyBundle.GetStringFromName("load-js-data-url-error"); promptService.alert(window, brandStr, errorStr); return false; }  
context: function OpenURL(aInNewWindow){    var currentIndex = gHistoryTree.currentIndex;         var builder = gHistoryTree.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder);    var url = builder.getResourceAtIndex(currentIndex).Value;        if (aInNewWindow) {      var count = gHistoryTree.treeBoxObject.view.selection.count;      if (count == 1) {        if (isContainer(gHistoryTree, currentIndex))          openDialog("chrome://communicator/content/history/history.xul",                      "", "chrome,all,dialog=no", url, "newWindow");        else                openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url );      }      else {        var min = new Object();         var max = new Object();        var rangeCount = gHistoryTree.treeBoxObject.view.selection.getRangeCount();        for (var i = 0; i < rangeCount; ++i) {          gHistoryTree.treeBoxObject.view.selection.getRangeAt(i, min, max);          for (var k = max.value; k >= min.value; --k) {            url = gHistoryTree.treeBoxObject.view.getCellText(k, "URL");            window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", url);          }        }      }    }            else if (!isContainer(gHistoryTree, currentIndex))      openTopWin(url);    return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/7053f3fe21df361c9a3acf5a42df6f80191d4553/history.js/buggy/xpfe/components/history/resources/history.js