Skip to content
Snippets Groups Projects
Commit 5fdfd60f authored by Matt Buckley's avatar Matt Buckley
Browse files

Fix possible leaks in CanvasContext HintSessionWrapper

Ensure the mHintSessionFuture is accounted for correctly in the
destructor.

Bug: b/297230599
Test: manual
Change-Id: Idcbd0f2ba87290f090d693f0a64cb46fe8270b95
Merged-In: Idcbd0f2ba87290f090d693f0a64cb46fe8270b95
(cherry picked from commit ac620f64)
parent 0de10414
No related branches found
No related tags found
No related merge requests found
......@@ -93,8 +93,13 @@ HintSessionWrapper::HintSessionWrapper(pid_t uiThreadId, pid_t renderThreadId)
: mUiThreadId(uiThreadId), mRenderThreadId(renderThreadId) {}
HintSessionWrapper::~HintSessionWrapper() {
if (mHintSessionFuture.valid()) {
mHintSession = mHintSessionFuture.get();
}
if (mHintSession) {
gAPH_closeSessionFn(mHintSession);
mSessionValid = true;
mHintSession = nullptr;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment