summaryrefslogtreecommitdiffstats
path: root/chrome/common/service_process_util_mac.mm
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 03:51:10 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-05 03:51:10 +0000
commite9b738ea96bb9745c9ed4fe49daa707d0d874c35 (patch)
tree9e6435d21eec15173be463d2472082c6a29066ed /chrome/common/service_process_util_mac.mm
parent1674649497e1a2f646741b7cb0239113d1f7111a (diff)
downloadchromium_src-e9b738ea96bb9745c9ed4fe49daa707d0d874c35.zip
chromium_src-e9b738ea96bb9745c9ed4fe49daa707d0d874c35.tar.gz
chromium_src-e9b738ea96bb9745c9ed4fe49daa707d0d874c35.tar.bz2
Make sure that scoped_ptr<> cannot be used with ref-counted objects.
It's easy to type scoped_ptr<> instead of scoped_refptr<>. Such bugs are hard to debug sometimes. This change adds compile-time check to make sure that scoped_ptr<> is not used for ref-counted objects. Also fixed one (benign) instance of scoped_ptr<> being used for a ref-counted object. Review URL: http://codereview.chromium.org/9958150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_mac.mm')
-rw-r--r--chrome/common/service_process_util_mac.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index 7ea7926..4100bcb 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -319,13 +319,13 @@ bool ServiceProcessState::StateData::WatchExecutable() {
}
FilePath executable_path = FilePath([exe_path fileSystemRepresentation]);
- scoped_ptr<ExecFilePathWatcherDelegate> delegate(
+ scoped_refptr<ExecFilePathWatcherDelegate> delegate(
new ExecFilePathWatcherDelegate);
if (!delegate->Init(executable_path)) {
DLOG(ERROR) << "executable_watcher_.Init " << executable_path.value();
return false;
}
- if (!executable_watcher_.Watch(executable_path, delegate.release())) {
+ if (!executable_watcher_.Watch(executable_path, delegate)) {
DLOG(ERROR) << "executable_watcher_.watch " << executable_path.value();
return false;
}