From ea053a985f8ea48d57a2cb197fcec44e90382863 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Mon, 11 Apr 2011 19:17:13 +0000 Subject: FileVersionInfoMac should retain the result of +[NSBundle bundleWithPath:] prior to placing it in a scoped_nsobject, otherwise the NSBundle might be released prematurely. This should fix FutureCat zombie crashes. BUG=78652 TEST=No more NSBundle zombie crashes should show up on the crash server. Review URL: http://codereview.chromium.org/6813085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81136 0039d316-1c4b-4281-b951-d872f2087c98 --- base/file_version_info_mac.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm index bcfd854..293d904 100644 --- a/base/file_version_info_mac.mm +++ b/base/file_version_info_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,7 +11,8 @@ #include "base/mac/mac_util.h" #include "base/sys_string_conversions.h" -FileVersionInfoMac::FileVersionInfoMac(NSBundle *bundle) : bundle_(bundle) { +FileVersionInfoMac::FileVersionInfoMac(NSBundle *bundle) + : bundle_([bundle retain]) { } FileVersionInfoMac::~FileVersionInfoMac() {} -- cgit v1.1