rem:    windowID.gCurrentMessageUri = messageURI; windowID.gCurrentFolderUri = msgHdr.folder.URI; windowID.UpdateMailToolbar('MsgOpenExistingWindowForMessage'); 
add:    windowID.gCurrentMessageUri = messageURI; windowID.gCurrentFolderUri = msgHdr.folder.URI; windowID.UpdateMailToolbar('MsgOpenExistingWindowForMessage'); 
context: function MsgOpenSelectedMessageInExistingWindow(){    var windowID = GetWindowByWindowType("mail:messageWindow");    if (!windowID)      return false;    try {        var messageURI = gDBView.URIForFirstSelectedMessage;        var msgHdr = gDBView.hdrForFirstSelectedMessage;        // Reset the window's message uri and folder uri vars, and        // update the command handlers to what's going to be used.        // This has to be done before the call to CreateView().        windowID.gCurrentMessageUri = messageURI;        windowID.gCurrentFolderUri = msgHdr.folder.URI;        windowID.UpdateMailToolbar('MsgOpenExistingWindowForMessage');        // even if the folder uri's match, we can't use the existing view        // (msgHdr.folder.URI == windowID.gCurrentFolderUri)        // the reason is quick search and mail views.        // see bug #187673        //        // for the sake of simplicity,        // let's always call CreateView(gDBView)        // which will clone gDBView        windowID.CreateView(gDBView);        windowID.LoadMessageByMsgKey(msgHdr.messageKey);        // bring existing window to front        windowID.focus();        return true;    }    catch (ex) {        dump("reusing existing standalone message window failed: " + ex + "\n");    }    return false;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/b63a5b72361765e9c991347479ce265f17a15db6/mailWindowOverlay.js/buggy/mail/base/content/mailWindowOverlay.js