From 52ea69681081b1a8efc21a7441bfa1f01e00339d Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Wed, 4 Nov 2015 15:53:50 -0800 Subject: [PATCH] fix(notifs): Hopefully prevent gc of NodeObjC objects --- src/browser/native-notification-manager.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/browser/native-notification-manager.coffee b/src/browser/native-notification-manager.coffee index 61556d6ce..e2c41bc3a 100644 --- a/src/browser/native-notification-manager.coffee +++ b/src/browser/native-notification-manager.coffee @@ -23,6 +23,10 @@ class NativeNotificationManagerMacOSX @_delegate = Delegate('alloc')('init') @_center('setDelegate', @_delegate) + # Ensure that these objects are never, ever garbage collected + global.__nativeNotificationManagerMacOSXDelegate = Delegate + global.__nativeNotificationManagerMacOSX = @ + ipc.on('fire-native-notification', @onFireNotification) shouldPresentNotification: (self, _cmd, center, notif) =>