Closed Bug 149075 Opened 18 years ago Closed 16 years ago
Do Command(open Inbox) crashes mozilla if no messenger
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
borrowed this code from nsCmdLineService::GetHandlerForParam
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.
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
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, 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 email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9263d25afcd0 Backout - While it is compatible with the SVG specification, all other browsers allow it
You need to log in before you can comment on or make changes to this bug.