Closed Bug 149075 Opened 18 years ago Closed 16 years ago

remote xfeDoCommand(openInbox) crashes mozilla if no messenger

Categories

(Core Graveyard :: X-remote, defect, critical)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: stef, Assigned: blizzard)

Details

(Keywords: crash)

Attachments

(1 file, 1 obsolete file)

The mailnews can be opened remotely by running

  mozilla -remote 'xfeDoCommand(openInbox)'

If messenger is not installed then mozilla 
produces an error popup and finally crashes.


build: Linux i686 - 2002060109 Trunk
confirming with Linux current CVS.
adding crash keyword.

the dialog error messages says that it can't find
chrome/packages/messenger/messenger.xul
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: crash
Attached patch patch (obsolete) — Splinter Review
borrowed this code from nsCmdLineService::GetHandlerForParam
Keywords: patch
Severity: major → critical
Andrew, have you seeked review for this patch?
BTW you patch against revision 1.19, but at the moment we war already at
revision 1.28. Perhaps you should update your patch, so that it can be applied
more easily.
Attached patch patch v2Splinter Review
the previous patch was still valid, but this uses newer syntax for getting the
commandline service.  it still seems like a hack, but I don't know of a more
direct way.

also, current trunk does not crash without the patch (just puts up a dialog
box), but it does not exit cleanly after all windows are closed.
Attachment #86359 - Attachment is obsolete: true
Attachment #123973 - Flags: review?(blizzard)
Comment on attachment 123973 [details] [diff] [review]
patch v2

>+  nsICmdLineHandler *handler;
>+  nsresult rv = CallGetService("@mozilla.org/commandlinehandler/general-startup;1?type=mail",
>+        &handler);
>+  if (NS_FAILED(rv))
>+    return NS_ERROR_FAILURE;
>+  NS_RELEASE(handler);

This is what nsCOMPtr<> was designed for.
Attachment #123973 - Flags: review?(blizzard) → review-
I couldn't get an nsCOMPtr to compile with CallGetService():
no matching function for call to `CallGetService(const char[60],
nsCOMPtr<nsICmdLineHandler>*)'
ajschult: use
nsCOMPtr<nsIFoo> foo = do_GetService("...", &rv);

I think this got fixed by something else though.  I see no crash here if I don't
have mailnews built (using firefox).  WORKSFORME.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
Backout by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9263d25afcd0
Backout - While it is compatible with the SVG specification, all other browsers allow it
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.