rem: var viewFlags = GetDBView().viewFlags; 
add: var dbview = GetDBView(); var viewFlags = dbview.viewFlags; 
context: function MsgSortThreaded(){    var viewFlags = GetDBView().viewFlags;    if (viewFlags & nsMsgViewFlagsType.kGroupBySort)    {      GetDBView().viewFlags &= ~nsMsgViewFlagsType.kGroupBySort;      viewDebug("switching view to all msgs\n");      SwitchView("cmd_viewAllMsgs");    }    // Toggle if not already threaded.    else if ((viewFlags & nsMsgViewFlagsType.kThreadedDisplay) == 0)        MsgToggleThreaded();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/a185c3eccf4285ad9d3df8a0518794f4e362dc2b/threadPane.js/buggy/mailnews/base/resources/content/threadPane.js