Closed Bug 1144256 Opened 10 years ago Closed 10 years ago

Thunderbird preferences chat.js uses preprocessor macros but isn't marked for preprocessing

Categories

(Thunderbird :: Preferences, defect)

defect
Not set
normal

Tracking

(thunderbird38 unaffected)

RESOLVED FIXED
Thunderbird 39.0
Tracking Status
thunderbird38 --- unaffected

People

(Reporter: aceman, Assigned: aceman)

References

Details

Attachments

(1 file, 1 obsolete file)

Error: SyntaxError: illegal character Source File: chrome://messenger/content/preferences/chat.js Line: 66 Source Code: #ifdef XP_MACOSX Seems to be caused by bug 1141932. I wonder how the patch there could ever work :)
Attached patch patch (obsolete) — Splinter Review
Looks like the are more problems there. This fixes at least the JS errors. I didn't get any sound from the button (on Linux), but that is for somebody else to fix.
Attachment #8578809 - Flags: review?(aleth)
Attachment #8578809 - Flags: feedback?(syshagarwal)
Comment on attachment 8578809 [details] [diff] [review] patch This looks OK to me, I'm unsure if you still want aleth to take a look or not.
Attachment #8578809 - Flags: review?(aleth)
Attachment #8578809 - Flags: review+
Attachment #8578809 - Flags: feedback?(syshagarwal)
(In reply to :aceman from comment #1) > Created attachment 8578809 [details] [diff] [review] > patch > > Looks like the are more problems there. This fixes at least the JS errors. I > didn't get any sound from the button (on Linux), but that is for somebody > else to fix. sshagarwal, did you test your patch on Linux?
Flags: needinfo?(syshagarwal)
Attached patch patch v2Splinter Review
As preprocessing makes life worse for devs, this version avoids it.
Attachment #8578809 - Attachment is obsolete: true
Attachment #8578836 - Flags: review?(aleth)
Comment on attachment 8578836 [details] [diff] [review] patch v2 Review of attachment 8578836 [details] [diff] [review]: ----------------------------------------------------------------- Good idea, thanks! I'd still like sshagarwal to check this actually works on Linux though, and file a followup if not.
Attachment #8578836 - Flags: review?(aleth) → review+
Keywords: checkin-needed
(In reply to aleth [:aleth] from comment #3) > (In reply to :aceman from comment #1) > > Created attachment 8578809 [details] [diff] [review] > > patch > > > > Looks like the are more problems there. This fixes at least the JS errors. I > > didn't get any sound from the button (on Linux), but that is for somebody > > else to fix. > > sshagarwal, did you test your patch on Linux? No, I just tested it on Mac. I don't have a Linux machine now.
Flags: needinfo?(syshagarwal)
Comment on attachment 8578836 [details] [diff] [review] patch v2 Review of attachment 8578836 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/components/preferences/chat.js @@ +65,5 @@ > if (!soundLocation.startsWith("file://")) { > + if (Services.appinfo.OS == "Darwin") // OS X > + sound.beep(); > + else > + sound.playEventSound(Ci.nsISound.EVENT_NEW_MAIL_RECEIVED); Do we need Ci before nsISound? http://mxr.mozilla.org/comm-central/source/suite/common/pref/preferences.js#68 doesn't have it.
Okay, maybe its needed (other places use Ci for accessing constant values) but since suite didn't use it, I skipped it. Thanks.
(In reply to Suyash Agarwal (:sshagarwal) from comment #7) > Comment on attachment 8578836 [details] [diff] [review] > patch v2 > > Review of attachment 8578836 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: mail/components/preferences/chat.js > @@ +65,5 @@ > > if (!soundLocation.startsWith("file://")) { > > + if (Services.appinfo.OS == "Darwin") // OS X > > + sound.beep(); > > + else > > + sound.playEventSound(Ci.nsISound.EVENT_NEW_MAIL_RECEIVED); > > Do we need Ci before nsISound? > http://mxr.mozilla.org/comm-central/source/suite/common/pref/preferences. > js#68 > doesn't have it. Because that place has nsISound defined as a const. In my patch it is visible that several lines above my change it is used as Ci.nsISound. There is no standalone nsISound defined.
Comment on attachment 8578836 [details] [diff] [review] patch v2 [Approval Request Comment] I assume we want this in TB 38? http://hg.mozilla.org/comm-central/rev/f5240eb961dc
Attachment #8578836 - Flags: approval-comm-aurora?
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
(In reply to Kent James (:rkent) from comment #10) > Comment on attachment 8578836 [details] [diff] [review] > patch v2 > > [Approval Request Comment] > I assume we want this in TB 38? If you have a Linux machine handy, could you verify it works on Linux first? (as per comment 1)
(In reply to aleth [:aleth] from comment #11) > (In reply to Kent James (:rkent) from comment #10) > > Comment on attachment 8578836 [details] [diff] [review] > > patch v2 > > > > [Approval Request Comment] > > I assume we want this in TB 38? I think the regressing bug 1141932 was only for TB39, so no backporting needed. > If you have a Linux machine handy, could you verify it works on Linux first? > (as per comment 1) The patch as a syntax error fix does work on Linux, that is where I made it. Whether the sound actually plays is a different matter and should be filed independently. And made to block bug 1141932.
Comment on attachment 8578836 [details] [diff] [review] patch v2 Not needed in Thunderbird 38 per comment 12
Attachment #8578836 - Flags: approval-comm-aurora?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: