Closed Bug 1492095 Opened Last year Closed Last year

Replace the XPCOM component registration for nsAppStartupNotifier removed in bug 1491741

Categories

(Calendar :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jorgk, Assigned: darktrojan)

References

Details

(Whiteboard: [Thunderbird-temporary-fix])

Attachments

(3 files, 1 obsolete file)

Causes test failures:
TEST-UNEXPECTED-FAIL | xpcshell-icaljs.ini:comm/calendar/test/unit/test_alarmservice.js | - TypeError: Components.classes['@mozilla.org/embedcomp/appstartup-notifier;1'] is undefined;
Same recipe as before.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #9009905 - Flags: review?(geoff)
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/b656dcc776f9
Replace the XPCOM component registration for nsAppStartupNotifier removed in bug 1491741. rs=bustage-fix DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 64.0
Version: 24 → 64
Blocks: 1491741
This compiled locally, but now I see that Linux and Mac are busted:
/builds/worker/workspace/build/src/comm/common/src/nsCommonModule.cpp:23:1: error: no member named 'QueryInterface' in 'nsAppStartupNotifier'
/builds/worker/workspace/build/src/obj-thunderbird/dist/include/mozilla/RefPtr.h:47:11: error: no member named 'Release' in 'nsAppStartupNotifier'
/builds/worker/workspace/build/src/obj-thunderbird/dist/include/mozilla/RefPtr.h:44:11: error: no member named 'AddRef' in 'nsAppStartupNotifier'

I noticed that Ehsan took this line away:
https://hg.mozilla.org/mozilla-central/rev/f60256376b97#l2.19

Or maybe it's due to the DeCOMtamination here:
https://hg.mozilla.org/mozilla-central/rev/a31e6269caee

In that case the recipe doesn't work and we need to take the approach of
https://hg.mozilla.org/comm-central/rev/a8bd1c32fd2d
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Grrr, I forgot to pull the latest M-C :-(
Looking at this further, I think we're out of luck here. The approach of bug 1485275 (https://hg.mozilla.org/comm-central/rev/a8bd1c32fd2d), because the nsAppStartupNotifier lost its XPCOM interface altogether.
Attachment #9009905 - Attachment description: 1492095-nsAppStartupNotifier.patch → 1492095-nsAppStartupNotifier.patch - not working, backed out.
Attachment #9009905 - Flags: review?(geoff)
Assignee: jorgk → nobody
Status: REOPENED → NEW
Keywords: leave-open
Product: MailNews Core → Calendar
Target Milestone: Thunderbird 64.0 → ---
Version: 64 → unspecified
Here's a bustage fix. Tests pass with the usage of "@mozilla.org/embedcomp/appstartup-notifier;1" simply removed.
Over to you, Geoff.
Flags: needinfo?(geoff)
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/cfc817da7111
Backed out changeset b656dcc776f9 for causing bustage. a=backout
https://hg.mozilla.org/comm-central/rev/96176520c895
temporarily remove use of nsAppStartupNotifier after removal of its XPCOM interface in bug 1491741. rs=bustage-fix DONTBUILD
Whiteboard: [Thunderbird-temporary-fix]
Philipp, is there a reason we use the app startup notifier instead of the observer service here? Can I just replace the use of one with the other?
Flags: needinfo?(philipp)
Attached patch 1492095-startup-notifier-1.diff (obsolete) — Splinter Review
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Flags: needinfo?(philipp)
Flags: needinfo?(geoff)
Attachment #9011337 - Flags: review?(philipp)
Blocks: 1484636
Comment on attachment 9011337 [details] [diff] [review]
1492095-startup-notifier-1.diff

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

r=philipp with eslint checked.

::: calendar/base/src/calAlarmService.js
@@ +227,5 @@
>          Services.obs.addObserver(this, "xpcom-shutdown");
>          Services.obs.addObserver(this, "wake_notification");
>  
> +        // Make sure the alarm monitor is alive so it's observing the notification.
> +        Cc["@mozilla.org/calendar/alarm-monitor;1"].getService(Ci.calIAlarmServiceObserver);

Does this pass eslint? You may need to disable no-unused-expressions in a comment for this to pass.
Attachment #9011337 - Flags: review?(philipp) → review+
That passes, but my notifyObserver calls don't.
Attachment #9011337 - Attachment is obsolete: true
Attachment #9012078 - Flags: review+
Checkin needed with a backout of 96176520c895.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/6dfdc289650b
Backed out temporary fix from changeset 96176520c895. a=backout
https://hg.mozilla.org/comm-central/rev/8b20130d8bb9
Replace use of XPCOM 'embedcomp/appstartup-notifier' after its removal in bug 1491741. r=philipp
Status: ASSIGNED → RESOLVED
Closed: Last yearLast year
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.6
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.