All users were logged out of Bugzilla on October 13th, 2018

Deleting calendar throws Error: error purging calendar: TypeError: calendar.deleteCalendar is not a function

RESOLVED FIXED in 1.7

Status

--
major
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ssitter, Assigned: ssitter)

Tracking

({regression})

Lightning 1.7
x86_64
Windows 7
regression

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Deleting a local storage calendar throws the following console message:

Error: error purging calendar: TypeError: calendar.deleteCalendar is not a function
Source File: [...]/calendar-js/calCalendarManager.js
Line: 748

Lightning 1.7a2 + Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120614 Thunderbird/15.0a2 (BuildID 20120614042001)
Is the calendar deleted anyway? Looks like the platform is being more strict when QI is missing or classinfo is not set. Possibly similar cause to the canNotify bug.
Severity: normal → major
(Assignee)

Comment 2

6 years ago
Created attachment 633893 [details] [diff] [review]
explicitly call QueryInterface()

It seem the problem can be fixed by explicitly calling QueryInterface().

Do you have any idea why this is required and not done implicitly? Is this an error in the storage provider? If I compare to caldav provider I see differences in getInterfaces() and QueryInterface(). For example it seems that calICalendar is implemented but not listed in any of the two methods.
Attachment #633893 - Flags: review?(philipp)
(Assignee)

Comment 3

6 years ago
Created attachment 633894 [details] [diff] [review]
propossed fix for storage provider
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #633894 - Flags: review?(philipp)
Comment on attachment 633894 [details] [diff] [review]
propossed fix for storage provider

XPCOM is made to only offer a certain interface (i.e if called with ...createInstance(Components.interfaces.calICalendar) then only calICalendar). This is not needed if nsIClassInfo is implemented (correctly), since XPCOM can then find out what else the object implements and binds the methods on the wrapper.

Is the bug fixed just by implementing the QI and classInfo correctly? Or is the explicit calling of QI still needed with this patch?
Attachment #633894 - Flags: review?(philipp) → review+
Attachment #633893 - Flags: review?(philipp) → review+
(Assignee)

Comment 5

6 years ago
Comment on attachment 633893 [details] [diff] [review]
explicitly call QueryInterface()

This patch is made obsolete by the other patch.
Attachment #633893 - Attachment is obsolete: true
(Assignee)

Comment 6

6 years ago
Pushed to https://hg.mozilla.org/comm-central/rev/729da3db0e60
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.8
(Assignee)

Updated

6 years ago
Attachment #633894 - Flags: approval-calendar-aurora?
Attachment #633894 - Flags: approval-calendar-aurora? → approval-calendar-aurora+
(Assignee)

Comment 7

6 years ago
Pushed to https://hg.mozilla.org/releases/comm-aurora/rev/89781f55710c
Target Milestone: 1.8 → 1.7
You need to log in before you can comment on or make changes to this bug.