code: function mergeOpenTabs(tabItems, openTabs) {
    var tabInfo = getOpenTabInfo(tabItems, openTabs);
  
    /* TODO: Use algorithm from OLDtabWindow.js to determine tab order.
     * For now, let's just concat open and closed tabs, in their sorted order.
     */
    var openTabItems = tabInfo.get(true, Immutable.Seq()).sortBy(function (ti) {
      return ti.openTabIndex;
    });
    var closedTabItems = tabInfo.get(false, Immutable.Seq()).sortBy(function (ti) {
      return ti.savedBookmarkIndex;
    });
  
    var mergedTabItems = openTabItems.concat(closedTabItems);
  
    return mergedTabItems;
  }
docs: Merge currently open tabs from an open Chrome window with tabItem state of a saved
  tabWindow
  
  @param {Seq<TabItem>} tabItems -- previous TabItem state
  @param {[Tab]} openTabs -- currently open tabs from Chrome window
  
  @returns {Seq<TabItem>} TabItems reflecting current window state