diff options
author | Chris Craik <ccraik@google.com> | 2014-04-11 13:47:36 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2014-04-11 13:48:46 -0700 |
commit | 143912fef8eff58146705849a0ba441ab6163409 (patch) | |
tree | fcb26a8040ad41abe6d55457de06842e4dbc0702 | |
parent | 494fb7b58a21a7a9a8eba3bacecffe115edcb8c6 (diff) | |
download | frameworks_base-143912fef8eff58146705849a0ba441ab6163409.zip frameworks_base-143912fef8eff58146705849a0ba441ab6163409.tar.gz frameworks_base-143912fef8eff58146705849a0ba441ab6163409.tar.bz2 |
Remove use-after-free signal in RenderNode
bug:9321162
mDestroyed is no longer useful, as RenderNode is ref counted (not to
mention having its lifecycle significantly redesigned).
Change-Id: I429b9dd7740362c85d6416fbae567f0d47098e4e
-rw-r--r-- | libs/hwui/RenderNode.cpp | 10 | ||||
-rw-r--r-- | libs/hwui/RenderNode.h | 1 |
2 files changed, 1 insertions, 10 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 823ae7b..bc0658f 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -50,17 +50,13 @@ void RenderNode::outputLogBuffer(int fd) { } RenderNode::RenderNode() - : mDestroyed(false) - , mNeedsPropertiesSync(false) + : mNeedsPropertiesSync(false) , mNeedsDisplayListDataSync(false) , mDisplayListData(0) , mStagingDisplayListData(0) { } RenderNode::~RenderNode() { - LOG_ALWAYS_FATAL_IF(mDestroyed, "Double destroyed DisplayList %p", this); - - mDestroyed = true; delete mDisplayListData; delete mStagingDisplayListData; } @@ -525,10 +521,6 @@ void RenderNode::issueOperationsOfProjectedChildren(OpenGLRenderer& renderer, T& template <class T> void RenderNode::issueOperations(OpenGLRenderer& renderer, T& handler) { const int level = handler.level(); - if (CC_UNLIKELY(mDestroyed)) { // temporary debug logging - ALOGW("Error: %s is drawing after destruction", mName.string()); - CRASH(); - } if (mDisplayListData->isEmpty() || properties().getAlpha() <= 0) { DISPLAY_LIST_LOGD("%*sEmpty display list (%p, %s)", level * 2, "", this, mName.string()); return; diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h index 7853701..9e6ee3f 100644 --- a/libs/hwui/RenderNode.h +++ b/libs/hwui/RenderNode.h @@ -210,7 +210,6 @@ private: void prepareSubTree(TreeInfo& info, DisplayListData* subtree); String8 mName; - bool mDestroyed; // used for debugging crash, TODO: remove once invalid state crash fixed bool mNeedsPropertiesSync; RenderProperties mProperties; |