code: function undoClosedTab(controller, event)
  {
    var count = sessionStoreService.getClosedTabCount(controller.window);
  
    switch (event.type) {
      case "menu":
        throw new Error("Menu gets build dynamically and cannot be accessed.");
        break;
      case "shortcut":
        var cmdKey = utils.getEntity(this.getDtds(), "tabCmd.commandkey");
        controller.keypress(null, cmdKey, {accelKey: true, shiftKey: true});
        break;
    }
  
    if (count > 0)
      controller.assertJS("subject.newTabCount < subject.oldTabCount",
                          {
                           newTabCount : sessionStoreService.getClosedTabCount(controller.window),
                           oldTabCount : count
                          });
  }
docs: Restores the tab which has been recently closed
  
  @param {MozMillController} controller
  MozMillController of the window to operate on
  @param {object} event
  Specifies the event to use to execute the command