Last Comment Bug 751923 - Failure during event creation [Exception 'TypeError: aItem.calendar.isInvitation is not a function' in calProviderUtils.jsm]
: Failure during event creation [Exception 'TypeError: aItem.calendar.isInvitat...
: regression
Product: Calendar
Classification: Client Software
Component: General (show other bugs)
: Lightning 1.7
: All All
-- blocker (vote)
: 1.7
Assigned To: Philipp Kewisch [:Fallen]
Depends on:
  Show dependency treegraph
Reported: 2012-05-04 09:32 PDT by Stefan Sitter
Modified: 2012-05-18 01:35 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Fix - v1 (5.00 KB, patch)
2012-05-17 18:44 PDT, Philipp Kewisch [:Fallen]
matthew.mecca: review+
Details | Diff | Splinter Review

Description User image Stefan Sitter 2012-05-04 09:32:10 PDT
Lightning 1.7a1 (BuildID: 20120502041524) with
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Thunderbird/15.0a1

Steps to reproduce:
1. create a new Thunderbird profile
2. install Lightning extension
3. create event in the default Home calendar
4. check console

Error: [Exception... "'TypeError: aItem.calendar.isInvitation is not a function' when calling method: [calIOperationListener::onOperationComplete]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "JS frame :: resource://calendar/modules/calProviderUtils.jsm :: cPB_notifyOperationComplete :: line 694"  data: no]
Comment 1 User image Matthew Mecca [:mmecca] 2012-05-07 21:25:29 PDT
Stefan, any idea of the regression range on this?
Comment 2 User image Stefan Sitter 2012-05-09 12:20:20 PDT
Regressed by a change in Thunderbird or Toolkit but not Lightning.

Works: Thunderbird 15.0a1 (20120503134801)
Fails: Thunderbird 15.0a1 (20120504031629)
Comment 3 User image Philipp Kewisch [:Fallen] 2012-05-17 18:44:29 PDT
Created attachment 624989 [details] [diff] [review]
Fix - v1

I can't say for sure why this patch fixes it, but it does. The original culprit was in calItipUtils, where isInvitation and getInvitedAttendees is checked just like the helper function in calUtils. But, for some reason the helper function in calUtils works!

I've also added calICalendar and calISchedulingSupport to the caldav provider's getInterfaces, in case thats part of the problem.

Just from a gut feeling, I think it might have to do with something in the wake of CPG, that if a QI is done in one compartment, then its not done so for the other one. Since calInstanceOf is also in calUtils.jsm, the patch works.

We might have to ask some xpconnect gurus on that or just hope nothing else breaks, or get rid of calInstanceOf some time.
Comment 4 User image Matthew Mecca [:mmecca] 2012-05-17 21:19:02 PDT
Comment on attachment 624989 [details] [diff] [review]
Fix - v1

Looks good. r=mmecca
Comment 5 User image Philipp Kewisch [:Fallen] 2012-05-18 01:35:17 PDT
Pushed to comm-central changeset 4a12eafd0b08

Note You need to log in before you can comment on or make changes to this bug.