add: if (!commands) { aEvent.preventDefault(); return; } 
context:   createContextMenu: function (aEvent)  {    var popup = aEvent.target;        // clear out the old context menu contents (if any)    while (popup.hasChildNodes())       popup.removeChild(popup.firstChild);        var popupNode = document.popupNode;        if (!("findRDFNode" in this))      throw "Clients must implement findRDFNode!";    var itemNode = this.findRDFNode(popupNode, true);    if (!itemNode || !itemNode.getAttribute("type") || itemNode.getAttribute("mode") == "edit") {      return;    }    if (!("getContextSelection" in this))       throw "Clients must implement getContextSelection!";    var selection = this.getContextSelection (itemNode);    var commonCommands = [];    for (var i = 0; i < selection.length; ++i) {      var nodeURI = NODE_ID(selection[i]);      var commands = this.getAllCmds(nodeURI);      commands = this.flattenEnumerator(commands);      if (!commonCommands.length) commonCommands = commands;      commonCommands = this.findCommonNodes(commands, commonCommands);    }    if (!commonCommands.length) {      aEvent.preventDefault();      return;    }        // Now that we should have generated a list of commands that is valid    // for the entire selection, build a context menu.    for (i = 0; i < commonCommands.length; ++i) {      const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";      var currCommand = commonCommands[i].QueryInterface(Components.interfaces.nsIRDFResource).Value;      var element = null;      if (currCommand != NC_NS_CMD + "separator") {        var commandName = this.getCommandName(currCommand);        element = this.createMenuItem(commandName, currCommand, itemNode);      }      else if (i != 0 && i < commonCommands.length-1) {        // Never append a separator as the first or last element in a context        // menu.        element = document.createElementNS(kXULNS, "menuseparator");      }            if (element)         popup.appendChild(element);    }    return;  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/b58a221f2fde203195889c6df948140558b290e2/bookmarksOverlay.js/clean/xpfe/components/bookmarks/resources/bookmarksOverlay.js