summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorMihai Popa <popam@google.com>2019-06-17 12:34:50 +0100
committerMihai Popa <popam@google.com>2019-06-17 12:46:16 +0100
commitafee43bfa163a657bd1204a29e7c807f276f8eb0 (patch)
tree3935135c23ea3640540bd23d2d3d01ff45d16500 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent3aa46b2dd00ab9bad26d4f27fa41e0d692afda90 (diff)
[Magnifier-87] Fix deadlock causing ANR
Before this CL, the magnifier could deadlock when the following happened: 1. the renderer is asked to draw (and a frame callback is provided) 2. a #dismiss() happens on the UI thread. This acquires mDestroyLock (previously line 309) 3. InternalPopupWindow#destroy() is called, and this calls mRenderer.destroy(). This attempts to destroy the renderer on the UI thread, however the UI thread will wait until the pending frame callback corresponding to step 1 is executed on the render thread. 4. The frame callback starts executing on the render thread, and tries to acquire mDestroyLock (previously line 1093). However, this is held by the UI thread, so a deadlock happens. This CL completely removes mDestroyLock, relying on the existing synchronization between the UI and render threads described in step 3. Bug: 134584742 Test: manual testing Change-Id: Ia4c75b5b997e0ed94d5a3814dd4507a8fffa124d
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions