Last Comment Bug 1117339 - Thunderbird 24 doesn't support using Promise as a constructor
: Thunderbird 24 doesn't support using Promise as a constructor
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Provider: GData (show other bugs)
: Trunk
: All All
-- normal (vote)
: 4.0.0.1
Assigned To: Philipp Kewisch [:Fallen]
:
:
Mentors:
Depends on:
Blocks: 1117541
  Show dependency treegraph
 
Reported: 2015-01-03 05:49 PST by Philipp Kewisch [:Fallen]
Modified: 2015-01-27 16:14 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix - v1 (6.84 KB, patch)
2015-01-03 05:49 PST, Philipp Kewisch [:Fallen]
mohit.kanwal: review-
Details | Diff | Splinter Review
Fix - v2 (6.84 KB, patch)
2015-01-23 03:27 PST, Philipp Kewisch [:Fallen]
mohit.kanwal: review+
Details | Diff | Splinter Review

Description User image Philipp Kewisch [:Fallen] 2015-01-03 05:49:16 PST
We need to go back to using deferred objects for TB24 compat. I've also separated the shim for Promise.jsm and PromiseUtils.jsm so that for cases where Promise.jsm exists but PromiseUtils.jsm doesn't, the native Promise implementation isn't overwritten.
Comment 1 User image Philipp Kewisch [:Fallen] 2015-01-03 05:49:50 PST
Created attachment 8543500 [details] [diff] [review]
Fix - v1
Comment 2 User image Mohit Kanwal [:redDragon] 2015-01-23 03:10:37 PST
Comment on attachment 8543500 [details] [diff] [review]
Fix - v1

Review of attachment 8543500 [details] [diff] [review]:
-----------------------------------------------------------------

I think the parameter name should be changed to aDetail otherwise the promise won't get rejected.

::: calendar/providers/gdata/components/calGoogleCalendar.js
@@ +629,5 @@
> +        this.setProperty("lastUpdated.tasks", "");
> +        this.mThrottle = Object.create(null);
> +        this.mOfflineStorage.QueryInterface(Components.interfaces.calICalendarProvider)
> +                            .deleteCalendar(this.mOfflineStorage, {
> +            onDeleteCalendar: function(aCalendar, aStatus, aDetal) {

parameter is `aDetal` while it is getting rejected with `aDetail`. A typo?
Comment 3 User image Philipp Kewisch [:Fallen] 2015-01-23 03:27:12 PST
Created attachment 8553678 [details] [diff] [review]
Fix - v2

Luckily the promise would just be rejected with undefined, but here is the patch to fix the typo :)
Comment 4 User image Mohit Kanwal [:redDragon] 2015-01-23 03:29:20 PST
Comment on attachment 8553678 [details] [diff] [review]
Fix - v2

Review of attachment 8553678 [details] [diff] [review]:
-----------------------------------------------------------------

Looks Good :)
Comment 5 User image Philipp Kewisch [:Fallen] 2015-01-27 16:14:40 PST
Pushed to comm-central changeset 2877aa0b36c2

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