summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderThread.h
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2021-04-02 16:26:03 +0000
committerSteven Moreland <smoreland@google.com>2021-04-02 16:26:03 +0000
commit76ec382218da25fb87cab979f676d2b2cda96ee2 (patch)
tree6453a3208aeb98dfedda10b83c1b22693bf68f43 /libs/hwui/renderthread/RenderThread.h
parent56d150ed1862017bd30590f4c4fd80ad64c1b317 (diff)
libhwui: RenderThread: fix UAF
Thread::run uses RefBase semantics and may delete the RenderThread out from under the client. Bug: 184196278 Test: no longer crashes when enhanced sp<> checks are enabled Change-Id: I9dc306c14339b7142bae5f801970600d75221eb6
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r--libs/hwui/renderthread/RenderThread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index a7d1ba8dafd7..9e5bce76e228 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -171,6 +171,7 @@ private:
friend class android::uirenderer::WebViewFunctor;
friend class android::uirenderer::skiapipeline::VkFunctorDrawHandler;
friend class android::uirenderer::VectorDrawable::Tree;
+ friend class sp<RenderThread>;
RenderThread();
virtual ~RenderThread();