rem: window.editorShell.wrapColumn = msgCompose.wrapLength; 
add: try { window.editorShell.wrapColumn = msgCompose.wrapLength; } catch (e) { dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n"); } 
context: function ComposeStartup(){	dump("Compose: StartUp\n");	// Get arguments	var args = GetArgs();	dump("[type=" + args.type + "]\n");	dump("[format=" + args.format + "]\n");	dump("[originalMsg=" + args.originalMsg + "]\n");	if (msgComposeService)	{		msgCompose = msgComposeService.InitCompose(window, args.originalMsg, args.type, args.format);		if (msgCompose)		{			// Generate a unique number, do we have a better way?			var date = new Date();			sessionID = date.getTime() + Math.random();						//Creating a Editor Shell  			var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance();  			editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell);			if (!editorShell)			{				dump("Failed to create editorShell!\n");				return;			}						// save the editorShell in the window. The editor JS expects to find it there.			window.editorShell = editorShell;			window.editorShell.Init();			dump("Created editorShell\n");			dump("initalizing the editor app core\n");			SetupToolbarElements(); //defined into EditorCommands.js			// setEditorType MUST be call before setContentWindow			if (msgCompose.composeHTML)			{				window.editorShell.SetEditorType("html");				dump("editor initialized in HTML mode\n");			}			else			{				window.editorShell.SetEditorType("text");				window.editorShell.wrapColumn = msgCompose.wrapLength;				dump("editor initialized in PLAIN TEXT mode\n");			}			window.editorShell.SetContentWindow(window.frames[0]);			window.editorShell.SetWebShellWindow(window);			window.editorShell.SetToolbarWindow(window);			// Now that we have an Editor AppCore, we can finish to initialize the Compose AppCore			msgCompose.editor = window.editorShell;						//Now we are ready to load all the fields (to, cc, subject, body, etc...)			msgCompose.LoadFields();//			document.getElementById("msgTo").focus();// If I call focus, Apprunner will crash later when closing this windows!		}	}}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/91f9c5fa68b43c5dfa82caba8593783c3ced0539/MsgComposeCommands.js/buggy/mailnews/compose/resources/content/MsgComposeCommands.js