summaryrefslogtreecommitdiffstats
path: root/libs/utils/RefBase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* remove files that moved to frameworks/nativeMathias Agopian2012-03-071-628/+0
| | | | Change-Id: I140d291e520097b1148930f736823650e08488f7
* Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGESteve Block2012-01-091-7/+7
| | | | | | | See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-5/+5
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-11/+11
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-1/+1
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* fix a memory leak and memory corruption in RefBaseMathias Agopian2011-08-111-44/+39
| | | | | | | | | | | | | | | | | we would leak a weakref_impl if a RefBase was never incWeak()'ed. there was also a dangling pointer that would cause memory corruption and double-delete when a custom destroyer was used to delay the execution of ~RefBase. it turns out that the custom destroyer feature caused most of the problems, so it's now gone. The only client was SurfaceFlinger who now handles things on its own. RefBase is essentially back its "gingerbread" state, but the code was slightly cleaned-up. Bug: 5151207, 5084978 Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
* fix RefBase so it retains binary-compatibility with gingerbreadMathias Agopian2011-06-131-9/+25
| | | | | Bug: 4595257 Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
* am b40e85f9: am 645434fb: Merge "Fix a leak in RefBase" into honeycomb-mr2Mathias Agopian2011-06-081-6/+10
|\ | | | | | | | | * commit 'b40e85f90146a654bfe5657187be491147814ea0': Fix a leak in RefBase
| * Fix a leak in RefBaseMathias Agopian2011-06-081-6/+10
| | | | | | | | | | | | | | this bug was introduced recently. it caused RefBase's weakref_impl structure to be leaked for every RefBase object (about 20 bytes). Change-Id: Id85e749ba04521199555dd701198edd097c313d4
| * merge various SF fixes from gingerbread to honeycomb-mr2 (DO NOT MERGE)Mathias Agopian2011-06-061-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Fix a race that could cause GL commands to be executed from the wrong thread. RefBase subclasses can now decide how they want to be destroyed. Fix a race in SurfaceFlinger that could cause layers to be leaked forever. Fix a race-condtion in SurfaceFlinger that could lead to a crash. initial cherry-pick: resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp Change-Id: I2a335e03fff219e35c18a7b0089b3a11d636576f
* | resolved conflicts for merge of b9783b49 to honeycomb-plus-aospMarco Nelissen2011-06-061-3/+9
|\ \ | | | | | | | | | Change-Id: I1d86ea56b3d1d1b69f6671e5b0df0ca3f0c79643
| * \ am c9cd2387: Merge changes I37f0f315,I8cbf6044,Ibb598931,I5262bf11 into ↵Simon Wilson2011-05-241-3/+9
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gingerbread * commit 'c9cd2387b6938a6fbefc731d2177902266f2a130': Fix a race that could cause GL commands to be executed from the wrong thread. RefBase subclasses can now decide how they want to be destroyed. Fix a race in SurfaceFlinger that could cause layers to be leaked forever. Fix a race-condtion in SurfaceFlinger that could lead to a crash.
| | * | RefBase subclasses can now decide how they want to be destroyed.Mathias Agopian2011-05-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a destroy() virtual on RefBase which sublasses can implement. destroy() is called in lieu of the destructor whenthe last strong ref goes away. Bug: 4483050 Change-Id: I8cbf6044a6fd3f01043a45592b5a60fa1e5fade2
* | | | am bb93dad9: am bb10986c: am 13ce221e: Merge "libutils: Fix an improper ↵Kenny Root2011-04-261-1/+1
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | const-cast in RefBase" * commit 'bb93dad9250c0ee8330ab37bbdcd2eb8bfc0f930': libutils: Fix an improper const-cast in RefBase
| * | libutils: Fix an improper const-cast in RefBaseJosh Stone2011-04-221-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under Fedora 15 Beta, gcc 4.6.0 warns: frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’: frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive] trackMe is not a const function, so don't use const in the static_cast to a weakref_impl pointer. Change-Id: I3c9ba73eb127985f5f54197ffecf2939c50f632c
* | Fix sp<> conversion operator / constructorMathias Agopian2011-02-251-4/+30
| | | | | | | | | | | | | | | | | | | | some of the conversion operators were not using the proper pointer type when calling incStrong/decStrong, usually it has no bad consequences, but for some implementation of the ref-counted object it could lead to recording the wrong owner id. Change-Id: If574b9069b8a4cf6e0911a992c8f095aba799995
* | Fix some issues with RefBase debugging.Mathias Agopian2011-02-231-70/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First slipt sp<> out of RefBase into StrongPointer.h so it can be reused more easily and to make it clear that it doesn't require RefBase. Note: the rest of the change only affects the system when DEBUG_REFS is enabled. The main problem we fix here is that the owner id associated with each reference could get out of date when a sp<> or wp<> was moved, for instance when they're used in a Vector< >. We fix this issue by calling into RefBase::moveReferences from a template specialization for sp<TYPE> and wp<TYPE> of the type helpers. RefBase::moveReferences() has then a chance to update the owner ids. There is a little bit of trickery to implement this generically in RefBase, where we need to use a templatized functor that can turn a sp<TYPE>* casted to a void* into a RefBase*. Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS currently set to 0 by default as there seem to be an issue with sp<ANativeWindow> which trips the sanity checks. Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
* | Remove RefBase.h dependency on TextOutput.hMathias Agopian2011-02-221-1/+17
|/ | | | Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+534
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-534/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+534