Fix crashes in auto updater.

This commit is contained in:
Cheng Zhao 2013-06-03 17:58:34 +08:00
parent 600f38c94d
commit 7f605c8442
2 changed files with 3 additions and 6 deletions

View file

@ -56,10 +56,6 @@ void CallNSInvocation(ScopedNSInvocation invocation) {
base::Bind(&CallNSInvocation, base::Passed(invocation_ptr.Pass()))); base::Bind(&CallNSInvocation, base::Passed(invocation_ptr.Pass())));
} }
- (void)updaterWillRelaunchApplication:(SUUpdater*)updater {
[[SUUpdater sharedUpdater] setDelegate:nil];
}
@end @end
namespace auto_updater { namespace auto_updater {
@ -67,7 +63,6 @@ namespace auto_updater {
// static // static
void AutoUpdater::Init() { void AutoUpdater::Init() {
SUUpdaterDelegate* delegate = [[SUUpdaterDelegate alloc] init]; SUUpdaterDelegate* delegate = [[SUUpdaterDelegate alloc] init];
[delegate autorelease];
[[SUUpdater sharedUpdater] setDelegate:delegate]; [[SUUpdater sharedUpdater] setDelegate:delegate];
} }
@ -89,7 +84,7 @@ void AutoUpdater::SetAutomaticallyDownloadsUpdates(bool yes) {
// static // static
void AutoUpdater::CheckForUpdates() { void AutoUpdater::CheckForUpdates() {
[[SUUpdater sharedUpdater] checkForUpdates:[SUUpdater sharedUpdater]]; [[SUUpdater sharedUpdater] checkForUpdates:nil];
} }
// static // static

View file

@ -8,6 +8,8 @@
<string>${PRODUCT_NAME}</string> <string>${PRODUCT_NAME}</string>
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>atom.icns</string> <string>atom.icns</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key> <key>NSMainNibFile</key>
<string>MainMenu</string> <string>MainMenu</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>