diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 19:17:13 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 19:17:13 +0000 |
commit | ea053a985f8ea48d57a2cb197fcec44e90382863 (patch) | |
tree | b9a310f6216e23526212f1ae49586933a4a0776e /base/file_version_info_mac.mm | |
parent | ea192e83450c3391f03c59219dfc9797e912a0d1 (diff) | |
download | chromium_src-ea053a985f8ea48d57a2cb197fcec44e90382863.zip chromium_src-ea053a985f8ea48d57a2cb197fcec44e90382863.tar.gz chromium_src-ea053a985f8ea48d57a2cb197fcec44e90382863.tar.bz2 |
FileVersionInfoMac should retain the result of +[NSBundle bundleWithPath:]
prior to placing it in a scoped_nsobject<NSBundle>, 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
Diffstat (limited to 'base/file_version_info_mac.mm')
-rw-r--r-- | base/file_version_info_mac.mm | 5 |
1 files 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() {} |