Bug 1268856 - Print email with event, the event is missing in the print-out;r+a=philipp
authormakemyday@gmx-topmail.de
Mon, 23 May 2016 23:48:00 +0200
changeset 27196 ee8bca50ea41c3ca07cefea3b7d39ece0700fd22
parent 27195 f5fd987d0f184a550775d77ade37403bdb53c95e
child 27197 06c3aadde9bf312e681fd0e12bb253075b204b5a
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1268856
Bug 1268856 - Print email with event, the event is missing in the print-out;r+a=philipp
calendar/lightning/components/lightningTextCalendarConverter.js
--- a/calendar/lightning/components/lightningTextCalendarConverter.js
+++ b/calendar/lightning/components/lightningTextCalendarConverter.js
@@ -50,34 +50,34 @@ ltnMimeConverter.prototype = {
         if (!event) {
             return '';
         }
 
         let itipItem = null;
         let msgOverlay = '';
 
         try {
+            itipItem = Components.classes["@mozilla.org/calendar/itip-item;1"]
+                                 .createInstance(Components.interfaces.calIItipItem);
+            itipItem.init(data);
+            let dom = ltn.invitation.createInvitationOverlay(event, itipItem);
+            msgOverlay = cal.xml.serializeDOM(dom);
+
             // this.uri is the message URL that we are processing.
             // We use it to get the nsMsgHeaderSink to store the calItipItem.
             if (this.uri) {
                 let msgWindow = null;
                 try {
                     let msgUrl = this.uri.QueryInterface(Components.interfaces.nsIMsgMailNewsUrl);
                     // msgWindow is optional in some scenarios
                     // (e.g. gloda in action, throws NS_ERROR_INVALID_POINTER then)
                     msgWindow = msgUrl.msgWindow;
                 } catch (exc) {
                 }
                 if (msgWindow) {
-                    itipItem = Components.classes["@mozilla.org/calendar/itip-item;1"]
-                                         .createInstance(Components.interfaces.calIItipItem);
-                    itipItem.init(data);
-                    let dom = ltn.invitation.createInvitationOverlay(event, itipItem);
-                    msgOverlay = cal.xml.serializeDOM(dom);
-
                     let sinkProps = msgWindow.msgHeaderSink.properties;
                     sinkProps.setPropertyAsInterface("itipItem", itipItem);
                     sinkProps.setPropertyAsAUTF8String("msgOverlay", msgOverlay);
 
                     // Notify the observer that the itipItem is available
                     Services.obs.notifyObservers(null, "onItipItemCreation", 0);
                 }
             }