rem: var viewFlags = gDBView.viewFlags; var viewType = gDBView.viewType;  
add: var viewFlags = gDBView ? gDBView.viewFlags : 0; var viewType = gDBView ? gDBView.viewType : 0;  
context: function InitViewMessagesMenu(){  var viewFlags = gDBView.viewFlags;  var viewType = gDBView.viewType;    var allMenuItem = document.getElementById("viewAllMessagesMenuItem");  if (allMenuItem)    allMenuItem.setAttribute("checked",  (viewFlags & nsMsgViewFlagsType.kUnreadOnly) == 0 && (viewType == nsMsgViewType.eShowAllThreads));  var unreadMenuItem = document.getElementById("viewUnreadMessagesMenuItem");  if (unreadMenuItem)    unreadMenuItem.setAttribute("checked", (viewFlags & nsMsgViewFlagsType.kUnreadOnly) != 0);  var theadsWithUnreadMenuItem = document.getElementById("viewThreadsWithUnreadMenuItem");  if (theadsWithUnreadMenuItem)    theadsWithUnreadMenuItem.setAttribute("checked", viewType == nsMsgViewType.eShowThreadsWithUnread);  var watchedTheadsWithUnreadMenuItem = document.getElementById("viewWatchedThreadsWithUnreadMenuItem");  if (watchedTheadsWithUnreadMenuItem)    watchedTheadsWithUnreadMenuItem.setAttribute("checked", viewType == nsMsgViewType.eShowWatchedThreadsWithUnread);    var ignoredTheadsMenuItem = document.getElementById("viewIgnoredThreadsMenuItem");  if (ignoredTheadsMenuItem)    ignoredTheadsMenuItem.setAttribute("checked", (viewFlags & nsMsgViewFlagsType.kShowIgnored) != 0);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/cb29b466cc7c1ac3fe5088c736a04a359b659190/mailWindowOverlay.js/clean/mailnews/base/resources/content/mailWindowOverlay.js