lib/js/tabWindow.js
function makeBookmarkedTabItem(bm) {
  var urlStr = bm.url;
  if (!urlStr) {
    console.error('makeBookmarkedTabItem: Malformed bookmark: missing URL!: ', bm);
    urlStr = ''; // better than null or undefined!
  }

  if (bm.title === undefined) {
    console.warn('makeBookmarkedTabItem: Bookmark title undefined (ignoring...): ', bm);
  }

  var tabItem = new TabItem({
    url: urlStr,

    saved: true,
    savedTitle: _.get(bm, 'title', urlStr),

    savedBookmarkId: bm.id,
    savedBookmarkIndex: bm.index
  });

  return tabItem;
}
function makeBookmarkedTabItem(bm) {
  var urlStr = bm.url;
  if (!urlStr) {
    console.error('makeBookmarkedTabItem: Malformed bookmark: missing URL!: ', bm);
    urlStr = ''; // better than null or undefined!
  }

  if (bm.title === undefined) {
    console.warn('makeBookmarkedTabItem: Bookmark title undefined (ignoring...): ', bm);
  }

  var tabItem = new TabItem({
    url: urlStr,

    saved: true,
    savedTitle: _.get(bm, 'title', urlStr),

    savedBookmarkId: bm.id,
    savedBookmarkIndex: bm.index
  });

  return tabItem;
}
function makeBookmarkedTabItem ( bm ) { var urlStr = bm . url ; if ( ! urlStr ) { console . error ( 'makeBookmarkedTabItem: Malformed bookmark: missing URL!: ' , bm ) ; urlStr = '' ; // better than null or undefined! } if ( bm . title === undefined ) { console . warn ( 'makeBookmarkedTabItem: Bookmark title undefined (ignoring...): ' , bm ) ; } var tabItem = new TabItem ( { url : urlStr , saved : true , savedTitle : _ . get ( bm , 'title' , urlStr ) , savedBookmarkId : bm . id , savedBookmarkIndex : bm . index } ) ; return tabItem ; }
Initialize a TabItem from a bookmark

Returned TabItem is closed (not associated with an open tab)
Initialize a TabItem from a bookmark