-mail doesn't work without a parameter

RESOLVED FIXED

Status

RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: neil, Assigned: neil)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

12 years ago
If you start suiterunner with -mail -addressbook only the address book opens.
From reading the code I guess the same bug affects Thunderbird.
(Assignee)

Comment 1

12 years ago
Created attachment 224306 [details] [diff] [review]
Proposed patch

Patch includes:
* #ifdefs to remove -options option from suite
* #ifdef to remove .eml handling from suite
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #224306 - Flags: review?(bugzilla)
Comment on attachment 224306 [details] [diff] [review]
Proposed patch

This works, but using the general.startup.mail pref I still get the following assertion (although the window does appear):

************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'Illegal value' when calling method: [nsICommandLine::handleFlagWithParam]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: file:///opt/mozmaster/mozilla/sm2/dist/bin/components/nsBrowserContentHandler.js :: handle :: line 387"  data: no]
************************************************************

I don't get this when starting up with -mail.
(Assignee)

Comment 3

12 years ago
(In reply to comment #2)
>This works, but using the general.startup.mail pref I still get the following
>assertion (although the window does appear):
Unfortunately this is an XPConnect limitation; the general startup code needs to throw an exception to propagate a failure code to HandleFlagWithParam.
Comment on attachment 224306 [details] [diff] [review]
Proposed patch

I haven't looked at all of this yet, but just so I don't forget:

nsMessengerBootstrap::Handle(nsICommandLine* aCmdLine)
 {
   nsresult rv;
-  PRBool found;

Thunderbird still needs this variable.
(Assignee)

Comment 5

12 years ago
Yeah, I'll add it back but inside the #ifndef block.
(In reply to comment #2)
> (From update of attachment 224306 [details] [diff] [review] [edit])
> This works, but using the general.startup.mail pref I still get the following
> assertion (although the window does appear):
> 
> ************************************************************
> * Call to xpconnect wrapped JSObject produced this error:  *
> [Exception... "'Illegal value' when calling method:
> [nsICommandLine::handleFlagWithParam]"  nsresult: "0x80070057
> (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame ::
> file:///opt/mozmaster/mozilla/sm2/dist/bin/components/nsBrowserContentHandler.js
> :: handle :: line 387"  data: no]
> ************************************************************
> 
> I don't get this when starting up with -mail.
> 
I don't appear to get this now, so I guess it may have been something in my build (I've rebuilt since).
Comment on attachment 224306 [details] [diff] [review]
Proposed patch

r=me with the tb compile error fixed.
Attachment #224306 - Flags: review?(bugzilla) → review+
(Assignee)

Comment 8

12 years ago
Created attachment 224628 [details] [diff] [review]
Fixed patch
Attachment #224628 - Flags: superreview?(bienvenu)

Updated

12 years ago
Attachment #224628 - Flags: superreview?(bienvenu) → superreview+
(Assignee)

Comment 9

12 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.