rem: var message = stringBundle.getString("invalidURI"); var title = stringBundle.getString("invalidURITitle"); promptservice.alert(window,title,message); 
add: var message = this._bundle.getString("invalidURI"); var title = this._bundle.getString("invalidURITitle"); promptService.alert(window, title, message); textbox.value = ""; textbox.focus(); return; 
context:   addPermission: function (aPermission)  {    var textbox = document.getElementById("url");    var host = textbox.value.replace(/^\s*([-\w]*:\/+)?/, ""); // trim any leading space and scheme    try {      var ioService = Components.classes["@mozilla.org/network/io-service;1"]                                .getService(Components.interfaces.nsIIOService);      var uri = ioService.newURI("http://"+host, null, null);      host = uri.host;    } catch(ex) {      var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                                    .getService(Components.interfaces.nsIPromptService);      var message = stringBundle.getString("invalidURI");      var title = stringBundle.getString("invalidURITitle");      promptservice.alert(window,title,message);    }    // we need this whether the perm exists or not    var stringKey = null;    switch (aPermission) {      case nsIPermissionManager.ALLOW_ACTION:        stringKey = "can";        break;      case nsIPermissionManager.DENY_ACTION:        stringKey = "cannot";        break;      case nsICookiePermission.ACCESS_SESSION:        stringKey = "canSession";        break;      default:        break;    }     // check whether the permission already exists, if not, add it    var exists = false;    for (var i = 0; i < this._addedPermissions.length; ++i) {      if (this._addedPermissions[i].rawHost == host) {        exists = true;        this._addedPermissions[i].capability = this._bundle.getString(stringKey);        this._addedPermissions[i].perm = aPermission;        break;      }    }        if (!exists) {      var p = new Permission(this._addedPermissions.length,                              host,                              (host.charAt(0) == ".") ? host.substring(1,host.length) : host,                              this._type,                              this._bundle.getString(stringKey),                              aPermission);      this._addedPermissions.push(p);            this._view._rowCount = this._addedPermissions.length;      this._tree.treeBoxObject.rowCountChanged(this._addedPermissions.length-1, 1);      this._tree.treeBoxObject.ensureRowIsVisible(this._addedPermissions.length-1);    }    textbox.value = "";    textbox.focus();    // covers a case where the site exists already, so the buttons don't disable    this.onHostInput(textbox);    // enable "remove all" button as needed    document.getElementById("removeAllPermissions").disabled = this._addedPermissions.length == 0;  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5682f325c3a767d2e0d2715af94ebcb730316fdb/CookieExceptions.js/clean/browser/components/cookieviewer/content/CookieExceptions.js