# HG changeset patch # User Jorg K <jorgk@jorgk.com> # Parent 2694f1118d8fb502ad32afc96ad85b45ba1aae7e Bug 1577117 - create command line via Cu.createCommandLine() after bug 1491560. r=mkmelin diff --git a/comm/mail/components/compose/content/MsgComposeCommands.js b/comm/mail/components/compose/content/MsgComposeCommands.js --- a/comm/mail/components/compose/content/MsgComposeCommands.js +++ b/comm/mail/components/compose/content/MsgComposeCommands.js @@ -2668,18 +2668,17 @@ function ComposeStartup(aParams) { if (args.bcc) composeFields.bcc = args.bcc; if (args.newsgroups) composeFields.newsgroups = args.newsgroups; if (args.subject) composeFields.subject = args.subject; if (args.attachment) { let attachmentList = args.attachment.split(","); - let commandLine = Cc["@mozilla.org/toolkit/command-line;1"] - .createInstance(); + let commandLine = Cu.createCommandLine(); for (let attachmentName of attachmentList) { // resolveURI does all the magic around working out what the // attachment is, including web pages, and generating the correct uri. let uri = commandLine.resolveURI(attachmentName); let attachment = Cc["@mozilla.org/messengercompose/attachment;1"] .createInstance(Ci.nsIMsgAttachment); // If uri is for a file and it exists set the attachment size. if (uri instanceof Ci.nsIFileURL) {