8db925f7777834eae5af386f7f92a22478c88346 |
|
09-May-2013 |
Mathias Agopian <mathias@google.com> |
remove unused declarations and reformat Change-Id: I4e168fb62c275e02621c4b6e0c6000d0f006c327
/system/core/include/utils/StrongPointer.h
|
9eb2a3b1c0cc1ff3082a9283e24c8babc112f56b |
|
07-May-2013 |
Mathias Agopian <mathias@google.com> |
libutils clean-up Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
/system/core/include/utils/StrongPointer.h
|
7332f80db5b942253f69b9b2e6cc3ae08d957d0e |
|
26-Feb-2011 |
Mathias Agopian <mathias@google.com> |
Fix sp<> conversion operator / constructor 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
/system/core/include/utils/StrongPointer.h
|
3e0f87541f7871ffde51c722d54550774fe1b7c3 |
|
25-Feb-2011 |
Mathias Agopian <mathias@google.com> |
Fix a wp<> bug where the owner ID would be wrong this was introduced recently. we make sure to use the correct owner id (the sp) instead of the wp. Change-Id: I78fdc6ec0c2d3e687278b70442d74d1924b512a2
/system/core/include/utils/StrongPointer.h
|
b26ea8b30f11cf0ad11ac7983208514a1bfafb75 |
|
17-Feb-2011 |
Mathias Agopian <mathias@google.com> |
Fix some issues with RefBase debugging. 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
/system/core/include/utils/StrongPointer.h
|