Bug 1783441 - Remove X-LIC-ERROR handling in CalIcsParser.parseString. r=#thunderbird-reviewers,darktrojan
authorLasana Murray <lasana@thunderbird.net>
Mon, 15 Aug 2022 12:15:21 +0000
changeset 36505 eb799eb069a5568f320b5dce404593d70f69dabf
parent 36504 0662c4678d860a8cb6fc94d14c8d3fc3bd75fdad
child 36506 94aab05fd3bc955312f4deccbeeece44e06b6de9
push id20187
push usergeoff@darktrojan.net
push dateTue, 16 Aug 2022 04:28:56 +0000
treeherdercomm-central@deab678344b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1783441
Bug 1783441 - Remove X-LIC-ERROR handling in CalIcsParser.parseString. r=#thunderbird-reviewers,darktrojan I'm not 100% sure what the purpose of these checks are but I beleive X-LIC-ERROR is a libical specific thing. Calling toString() on an icaljs freebusy property seems to mess up the formatting of the period string. Geoff tracked the cause down to here: https://searchfox.org/comm-central/rev/f57827565398fe6be1969d5107050822b5f2444f/calendar/base/modules/Ical.jsm#856-868 Not calling toString() while checking for X-LIC-ERROR avoids the problem though. Note that the check is not done in the async branch of parseString(). Differential Revision: https://phabricator.services.mozilla.com/D154571
calendar/base/src/CalIcsParser.jsm
--- a/calendar/base/src/CalIcsParser.jsm
+++ b/calendar/base/src/CalIcsParser.jsm
@@ -147,27 +147,16 @@ CalIcsParser.prototype = {
             cal.ERROR("Error Parsing ICS: " + rc);
             aAsyncParsing.onParsingComplete(rc, self);
           }
         },
       });
     } else {
       try {
         let icalComp = cal.icsService.parseICS(aICSString, aTzProvider);
-        // There is no such indicator like X-LIC in icaljs, so there would need to
-        // detect and log such errors already within the parser. However, until
-        // X-LIC or libical will be removed we make use of X-LIC-ERRORS here but
-        // don't add something similar to icaljs
-        if (icalComp.toString().match(/X-LIC-ERROR/)) {
-          cal.WARN(
-            "Parsing failed for parts of the item (while this is considered " +
-              "to be a minor issue, we continue processing the item):\n" +
-              icalComp.toString()
-          );
-        }
         this.processIcalComponent(icalComp);
       } catch (exc) {
         cal.ERROR(exc.message + " when parsing\n" + aICSString);
       }
     }
   },
 
   parseFromStream(aStream, aTzProvider, aAsyncParsing) {