summaryrefslogtreecommitdiffstats
path: root/base/memory/ref_counted.h
Commit message (Collapse)AuthorAgeFilesLines
* Make base::RefCountedBase methods inlinemikhail.pozdnyakov@intel.com2013-12-191-4/+43
| | | | | | | | | | | | Re-applying of the reverted https://codereview.chromium.org/88993002/ as it gives significant performance improvement. Please see http://code.google.com/p/chromium/issues/detail?id=328329 for the details. BUG=328329 Review URL: https://codereview.chromium.org/119143003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241937 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/88993002/mikhail.pozdnyakov@intel.com2013-12-121-43/+4
| | | | | | | | | | | | Reason for revert: http://code.google.com/p/chromium/issues/detail?id=326236 TBR=thakis@chromium.org,darin@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/114163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240334 0039d316-1c4b-4281-b951-d872f2087c98
* Make base::RefCountedBase methods inlinemikhail.pozdnyakov@intel.com2013-12-051-4/+43
| | | | | | | | Make base::RefCountedBase methods inline as it gives a performance impact (especially considering plenty of ref-counted objects and a lack of optimization for passing scoped_refptrs into functions -- there is no analogue to WTF::PassRefPtr). Review URL: https://codereview.chromium.org/88993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238956 0039d316-1c4b-4281-b951-d872f2087c98
* Add unit test for base::scoped_refptr boolean operations.mikhail.pozdnyakov@intel.com2013-10-211-0/+4
| | | | | | | | | Added unit test for base::scoped_refptr boolean operations. Also added a comment to 'operator T*() const' in order to make it more apparent to the User that boolean operations with scoped_refptr are possible without invoking 'get()' method. Review URL: https://codereview.chromium.org/26868003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229802 0039d316-1c4b-4281-b951-d872f2087c98
* Remove scoped_refptr::release which is confusing and causes leaks.piman@chromium.org2012-12-081-11/+0
| | | | | | | | | | | | | This fixes one leak in production and one leak in tests. The rest of the changes now show an explicit AddRef/Release pair, instead of a .release combined with a ->Release(). BUG=None Review URL: https://chromiumcodereview.appspot.com/11458003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171893 0039d316-1c4b-4281-b951-d872f2087c98
* Make RefCountedData thread-safeakalin@chromium.org2012-11-141-4/+5
| | | | | | | | | | | This is to make it difficult to use a non-thread-safe ref-counted object with multiple threads. BUG=160339 Review URL: https://chromiumcodereview.appspot.com/11359144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167633 0039d316-1c4b-4281-b951-d872f2087c98
* Add WARN_UNUSED_RESULT to scoped_refptr::release.xiaomings@google.com2012-08-281-1/+2
| | | | | | | | | | | | | | Also fixed some possible leaks related by scoped_refptr::release. See https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/b5thcBgubsM BUG= Review URL: https://chromiumcodereview.appspot.com/10874054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153719 0039d316-1c4b-4281-b951-d872f2087c98
* Purge ImplementsThreadSafeReferenceCounting() from the codebase now that ↵fischman@chromium.org2012-08-071-4/+0
| | | | | | | | | | Task is dead. TBR=ananta@chromium.org,apatrick@chromium.org Review URL: https://chromiumcodereview.appspot.com/10836116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150202 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructors, base/ editionrsleevi@chromium.org2012-06-261-4/+8
| | | | | | | | | | BUG=123295 TEST=it compiles Review URL: https://chromiumcodereview.appspot.com/10332269 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144130 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructorsrsleevi@chromium.org2012-06-251-0/+4
| | | | | | | | | | | | | Change content::ResourceResponse to be base::RefCountedData<> rather than directly inheriting from both ResourceResponseHead and base::RefCounted. BUG=123295 TEST=existing Review URL: https://chromiumcodereview.appspot.com/10416003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143880 0039d316-1c4b-4281-b951-d872f2087c98
* Add element_type in scoped_refptr.xhwang@chromium.org2012-06-191-0/+2
| | | | | | | | | | | | | | This will enable ::testing::IsNull and ::testing::NotNull on scoped_refptr. It was not working because GetRawPointer needs element_type to be defined in the Pointer type. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10558017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142997 0039d316-1c4b-4281-b951-d872f2087c98
* Add assert() for scoped_refptr<T>::operator->()akalin@chromium.org2012-01-311-1/+6
| | | | | | | | | | | | | | This is to make NULL dereference crashes more obvious. Also matches scoped_ptr (which uses assert) and weak_ptr (which uses DCHECK). DCHECK wasn't used because it pulls in logging.h, and that somehow conflicts with a webkit #define of LOG. BUG= TEST= Review URL: http://codereview.chromium.org/9232069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119820 0039d316-1c4b-4281-b951-d872f2087c98
* Fix scoped_refptr assignment operator in the case of having it as a member.mnaganov@chromium.org2012-01-051-3/+4
| | | | | | | | | | | | If a class holds a reference to itself in scoped_refptr, assigning to it a new value leads to calling Release while in destructor. R=levin@chromium.org TEST=RefCountedUnitTest.ScopedRefPtrToSelf Review URL: http://codereview.chromium.org/9021020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116480 0039d316-1c4b-4281-b951-d872f2087c98
* Rename BASE_API to BASE_EXPORT.darin@chromium.org2011-08-051-3/+3
| | | | | | | R=rvargas Review URL: http://codereview.chromium.org/7461141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-0/+299
raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98