Closed Bug 764976 Opened 12 years ago Closed 12 years ago

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

Categories

(Calendar :: Provider: Local Storage, defect)

Lightning 1.7
x86_64
Windows 7
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: ssitter)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

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
Attached patch explicitly call QueryInterface() (obsolete) β€” β€” Splinter Review
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: 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+
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
Pushed to https://hg.mozilla.org/comm-central/rev/729da3db0e60
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.8
Attachment #633894 - Flags: approval-calendar-aurora?
Attachment #633894 - Flags: approval-calendar-aurora? → approval-calendar-aurora+
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.

Attachment

General

Created:
Updated:
Size: